# 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 visualizzazioni (ultimi 30 giorni)
abed il 7 Dic 2013
Commentato: sixwwwwww il 9 Dic 2013
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 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (2)

sixwwwwww il 7 Dic 2013
Modificato: sixwwwwww il 7 Dic 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?
##### 4 CommentiMostra 2 commenti meno recentiNascondi 2 commenti meno recenti
abed il 9 Dic 2013
it is almost perfect but i want it with z=0 i tried to put z=0 in the plot 3d i couldnt because in this case the interval of z and x wont be the same so what should i do??
sixwwwwww il 9 Dic 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')

Accedi per commentare.

Walter Roberson il 7 Dic 2013
hold on
after the plot3()
##### 1 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
abed il 7 Dic 2013
Modificato: abed il 8 Dic 2013
i still get the same figure

Accedi per commentare.

### Categorie

Scopri di più su Annotations in Help Center e File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by