Plotting in a 3D space

조회 수: 4 (최근 30일)
Gopika R
Gopika R 2020년 7월 2일
댓글: Gopika R 2020년 7월 2일
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일
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
Gopika R
Gopika R 2020년 7월 2일
Thank you

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 7월 2일
r = num2cell(r);
plot3(r{:}, '*')
  댓글 수: 1
Gopika R
Gopika R 2020년 7월 2일
Thank you..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by