-1

I want to make a plot in Matlab like this.

How could I do something like this in Matlab?

Thank you all!

4

2 回答 2

3

做一些数据:

x = 1:0.1:100;
y = 1:5;
for i = y
    z(i,:) = sin(i*x);
end

绘制它:

figure
hold on
for i = y
    plot3(x,i*ones(size(x)),z(i,:))
end

修改绘图方面和视图:

daspect([100,2,2])
view(45,60)

这大致可以满足您的需要吗?

于 2013-07-08T11:32:06.560 回答
2

您可以使用命令 plot3(X,Y,Z)。

您必须构建三个矩阵,每个矩阵包含的列数等于您需要的系列数。(你发的图中6个)

例如

X = repmat([-200:200]',1,6);
Z = rand(401,6)*10;
Y = ones(401,1)*[1:20:120];
plot3(X,Y,Z)
axis image
于 2013-07-08T11:49:12.410 回答