converting 2D XY coordinated into Grid format

11 次查看(过去 30 天)
Hello ,
I have nearly 485719 XY coordinates and i would like to transfer this XY plotting over the grid format.
could you please do help me out.
I have already looked many examples but it does not help me out.
thank you

回答(1 个)

KSSV
KSSV 2020-4-1
It depends whether your data is gridded or scattered. Follow the below code to get what you want. Let A be your m*2 array.
x = A(:,1) ; y = A(:,2) ;
%%structured
xi = unique(x) ; yi = unique(y) ;
[X,Y] = meshgrid(xi,yi) ;
figure
plot(X,Y,'.r')
%%unstructured
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
figure
trimesh(tri,x,y)
  12 个评论
SatyaPrakash Gupta
It is approx 8mb and it is not allowing me, thats why i have asked for the shared link

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by