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?

 채택된 답변

Voss
Voss 2020년 7월 2일

0 개 추천

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

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 7월 2일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

태그

질문:

2020년 7월 2일

댓글:

2020년 7월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by