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?

 Respuesta aceptada

Voss
Voss el 2 de Jul. de 2020

0 votos

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

Más respuestas (1)

madhan ravi
madhan ravi el 2 de Jul. de 2020

0 votos

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

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 2 de Jul. de 2020

Comentada:

el 2 de Jul. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by