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 Center および File Exchange2-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