Create 3D scatter plot from matrix

2 ビュー (過去 30 日間)
Tom
Tom 2013 年 10 月 28 日
コメント済み: Tom 2013 年 10 月 28 日
Hello,
Could someone enlighten me how to make a 3D scatter plot from a matrix. Specifically, given a matrix of the form:
A =
1.0000
10.0604
-4.6736
-1.8343
Where the entries are to be defined as:
A(1) = atom number
A(2) = x-coordinate
A(3) = y-coordinate
A(4) = z-coordinate
How then, can I place a marker in the position defined by A(2) A(3) and A(4), and give it the label A(1) ?
Any help would be much appreciated.
Kind regards,
Tom

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 28 日
A=[1.0000;10.0604; -4.6736; -1.8343]
scatter3(A(2),A(3),A(4))
text(A(2),A(3),A(4),num2str(A(1)))
  1 件のコメント
Tom
Tom 2013 年 10 月 28 日
Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by