フィルターのクリア

Ho do I make a matrix with point data?

2 ビュー (過去 30 日間)
Hoyong Yie
Hoyong Yie 2020 年 9 月 13 日
コメント済み: KSSV 2020 年 9 月 14 日
I currently have data for 3d points and want to make a matrix out of them
This point data is structured as 3 matrices each containing x, y, z locations which look like these
x=[-3.266573190689087, -3.266134023666382, -3.266134023666382, -3.266573190689087, ... ]
y=[-0.372330516576767, -0.372330516576767, -0.371891230344772, -0.371451914310455, ... ]
z=[-0.085013940930367, -0.085015110671520, -0.084998413920403, -0.085046470165253, ... ]
My hope is to find a way to combine these three matrices into one matrix which would be
matrix( y(i) , x(i) ) = z(i)
x,y,z are all 168136818 long so I dont thick I can share them due to their size
Is there a way to do this in matlab?
thank you for your help.

採用された回答

KSSV
KSSV 2020 年 9 月 13 日
Let A be your m*3 data matrix.
x = A(:,1) ; y = A(:,2) ; z = A(:,3) ;
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
Z = reshape(z,size(X)) ;
figure
surf(X,Y,Z)
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trisurf(tri,x,y,z)
  14 件のコメント
Hoyong Yie
Hoyong Yie 2020 年 9 月 14 日
Ok thank you.
I'm quite new to matlab and was stuck with this for 2 weeks.
Your help is greatly appreciated.
KSSV
KSSV 2020 年 9 月 14 日
You are welcome...my pleasure helping you. :)

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by