凑合着看
clear,clc,close all
x = -2*pi:0.01*pi:2*pi;
t = linspace(0,1,length(x));
[xx,tt] = meshgrid(x,t);
% f = sin(x)*sin(2*pi*t);
f = zeros(length(x),length(t));
for i1 = 1:length(x)
for i2 = 1:length(x)
f(i1,i2) = sin(x(i1))*sin(2*pi*t(i2));
end
end
mesh(xx,tt,f);
grid on