1 view (last 30 days)

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

sixwwwwww
on 7 Dec 2013

Edited: sixwwwwww
on 7 Dec 2013

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?

sixwwwwww
on 8 Dec 2013

for lines along parallel to y-axis you can do as follow:

x = ones(1, 10);

y = 1:10;

for i = 0:9

plot3(x + i, y, x), hold on

end

xlabel('x'), ylabel('y'), zlabel('z')

Is it what you need?

sixwwwwww
on 9 Dec 2013

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')

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 0 Comments

Sign in to comment.