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 件のコメント

Gopika R
Gopika R 2020 年 7 月 2 日
Thank you

サインインしてコメントする。

その他の回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 2 日

0 投票

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

1 件のコメント

Gopika R
Gopika R 2020 年 7 月 2 日
Thank you..

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLine 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