point coordinates from different domains

2 ビュー (過去 30 日間)
Arash Nabovvati
Arash Nabovvati 2019 年 3 月 22 日
コメント済み: Walter Roberson 2019 年 3 月 23 日
hi
I want to plot3 some points with X,Y,Z coordinates from different known domain. for example, X= 1:0.5:10 Y=0:0.2:25 z=0:0.1:4 . I want to set all ponits witch have (X,Y,Z)'s coordinats from all possible member of domains one by one then use plot3 or scatter3 the point (all of them...not random or specific one). I want to use uniform distribution.

採用された回答

Walter Roberson
Walter Roberson 2019 年 3 月 23 日
X = 1:0.5:10; Y = 0:0.2:25; Z = 0:0.1:4;
[x, y, z] = ndgrid(X, Y, Z);
pointsize = 15;
scatter3(x(:), y(:), z(:), pointsize);
  2 件のコメント
Arash Nabovvati
Arash Nabovvati 2019 年 3 月 23 日
hi Walter,
thank you. It works.
Now , how could it be possible to make a struct like Points.X -Points.Y-Point.Z? where each point has its own cordinations inside the struct. i am asking this because X Y Z have different dimention.
Walter Roberson
Walter Roberson 2019 年 3 月 23 日
Points.X = X;
Points.Y = Y;
Points.Z = Z;
??
That would be the non-gridded points without repetitions. If you want the repeated points then there would be equal numbers and you would use
Points.X = x(:);
Points.Y = y(:);
Points.Z = z(:);
or
Points.X = x;
Points.Y = y;
Points.Z = z;
if you want the 3D grids.

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

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by