0

我有以下代码:

a=7
f=10
T=1/f;
v=40
wl=v/f;
x1=1;
x2=30
step=0.01

t=x1:step:x2;
x=x1:step:x2;
y=a*sind(2*pi*f*(t+(x*T)/wl)); 
h=plot(x,y);

我试过h=plot3(x,y,t)了,但线本身仍然是 2D 的。我应该把它转换成矩阵吗?

4

1 回答 1

1

创建一个点网格,然后使用mesh()

[x,t] = meshgrid(x,t);
y     = a*sind(2*pi*f*(t+(x*T)/wl)); 
mesh(y)
于 2013-05-07T18:35:00.030 回答