Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下代码:
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 的。我应该把它转换成矩阵吗?
h=plot3(x,y,t)
创建一个点网格,然后使用mesh():
mesh()
[x,t] = meshgrid(x,t); y = a*sind(2*pi*f*(t+(x*T)/wl)); mesh(y)