i want to draw 10 lines from x =0 till x=10 in 3d i tried but i wouldnt get my result any thoughts??
3 次查看(过去 30 天)
显示 更早的评论
x=0:1:10;
y=0:1:10;
z=0:1:10;
for j=0:1:10
for i=0:1:10
x=x+i;
end
plot3(x,y,z)
end
0 个评论
回答(2 个)
sixwwwwww
2013-12-7
编辑:sixwwwwww
2013-12-7
do need something like this:
x = 1:10;
y = 1:10;
for i = 1:10
plot3(x, y, x + i), hold on
end
Is it correct?
4 个评论
sixwwwwww
2013-12-9
you can plot at z = 0 as follow:
x = ones(1, 10);
y = 1:10;
z = zeros(1, 10);
for i = 0:9
plot3(x + i, y, z), hold on
end
xlabel('x'), ylabel('y'), zlabel('z')
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!