Plotting in a 3D space

4 visualizzazioni (ultimi 30 giorni)
Gopika R
Gopika R il 2 Lug 2020
Commentato: Gopika R il 2 Lug 2020
I have a vector r=[1;0;-1]; and I would like to plot this in the 3D space. Can anyone please help me with this?

Risposta accettata

Voss
Voss il 2 Lug 2020
This will plot a line segment from the origin to the point (1,0,-1):
plot3([0 r(1)],[0 r(2)],[0 r(3)]);

Più risposte (1)

madhan ravi
madhan ravi il 2 Lug 2020
r = num2cell(r);
plot3(r{:}, '*')

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by