How to plot multiple arrays in a 3d or surface plot?
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I plotted my array using the code:
x=[1*1001] vector from 0 to 1;
for nt=1:Nt
t=0.1+(nt-1)*dt;
...
u=some vector like [1*1001];
if abs(t-0.1)<10^(-8)
u1=u;
elseif abs(t-0.7)<10^(-8)
u2=u;
elseif abs(t-1.2)<10^(-8)
u3=u;
elseif abs(t-2.3)<10^(-8)
u4=u;
...
... % Here I have many conditions.
end
end
plot(x,u1)
hold on
plot(x,u2)
hold on
plot(x,u3)
... % I have many u** functions to plot!
However, I want to plot all these u** functions versus x and t.
x-axis should be x,
y axis should be t,
and z axis should be u**.
As you see, t conditions are specific. So my t axis should really associated with the correct t value. And u** should be associated with the correct t** value.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!