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?

 Réponse acceptée

Voss
Voss le 2 Juil 2020

0 votes

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)]);

Plus de réponses (1)

madhan ravi
madhan ravi le 2 Juil 2020

0 votes

r = num2cell(r);
plot3(r{:}, '*')

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by