MATLAB Answers

How to Plot the 3D points by Plot3 function in matlab?

267 ビュー (過去 30 日間)
Mahdi Noroozi
Mahdi Noroozi 2019 年 6 月 25 日
回答済み: Himanshu Rai 2019 年 6 月 25 日
This is a 3*6 matrix in which each column represents a three-dimensional point; I want to plot a three-dimensional plot using the Plot3 .
Thank you for answering
168.651320098755 168.656152628437 168.660985435090 168.665818518737 168.670651879402 168.675485517108
129.084161247190 129.022971519175 128.96177828414 128.900581541801 128.839381291840 128.778177533960
-13.7371238683462 -13.7375175202245 -13.7379111946644 -13.7383048916679 -13.7386986112370 -13.7390923533735

  1 件のコメント

Monika Phadnis
Monika Phadnis 2019 年 6 月 25 日
Let matrix be A
A = [168.651320098755 168.656152628437 168.660985435090 168.665818518737 168.670651879402 168.675485517108;
129.084161247190 129.022971519175 128.96177828414 128.900581541801 128.839381291840 128.778177533960;
-13.7371238683462 -13.7375175202245 -13.7379111946644 -13.7383048916679 -13.7386986112370 -13.7390923533735];
plot3(A(1,:),A(2,:),A(3,:))
So you send each row of matrix as X,Y and Z coordinate vectors.
Is this the desired result or you want something else?

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

採用された回答

Himanshu Rai
Himanshu Rai 2019 年 6 月 25 日
Use the following expression, assuming your matrix is stored in variable 'x'
plot3(x(1, :), x(2, :), x(3, :))

  0 件のコメント

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

その他の回答 (0 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by