converting 2D XY coordinated into Grid format

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 日

0 投票

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
SatyaPrakash Gupta 2020 年 4 月 1 日
I get an error as below attached.
KSSV
KSSV 2020 年 4 月 1 日
It looks like your data is scattered......attach your data. Read about griddata. Did you try the second option?
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 2 日
Yes but it does not help and also yes my data are scattered.
i have nearly 16533859 xy coordinates which make the system very very slow.
when i try to zoom the figure , it takes around 1 minute to click one time zoom, who can i increase the speed.
also request you to kindly do share me the link where i can understand the griddata
KSSV
KSSV 2020 年 4 月 2 日
YOu should use delaunay triangulation......it should be fast enough.
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 2 日
Hi
delaunary does not allow me to execute because i have huge set of datas
I see all the data to be appeared in 3D but i am only intrested in 2D.
is it possible to grid only over the xy coordinates instead doing in full figure ? if so then how shall i do it ?
Please note : as i mentioned i have a huge data approx :26598326
KSSV
KSSV 2020 年 4 月 2 日
delaunary does not allow me to execute because i have huge set of datas
did you a try?
I see all the data to be appeared in 3D but i am only intrested in 2D.
Did you check the code, which I gave it is using 2D.
is it possible to grid only over the xy coordinates instead doing in full figure ? if so then how shall i do it ?
Read about griddata.
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 2 日
編集済み: SatyaPrakash Gupta 2020 年 4 月 2 日
Yes i have tried all the method you have mentioned and delaunary works but takes lot of time
it take lot of time to plot data , how can i extract data or find data(i.e xy coordinates) from each grid ?
KSSV
KSSV 2020 年 4 月 2 日
Attach your data.
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 2 日
can you please do share me the link where i can share my data
KSSV
KSSV 2020 年 4 月 2 日
You can aatach here.
SatyaPrakash Gupta
SatyaPrakash Gupta 2020 年 4 月 2 日
It is approx 8mb and it is not allowing me, thats why i have asked for the shared link
KSSV
KSSV 2020 年 4 月 2 日
google drive.

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

カテゴリ

ヘルプ センター および File ExchangeTime Series Objects についてさらに検索

製品

リリース

R2018b

質問済み:

2020 年 4 月 1 日

コメント済み:

2020 年 4 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by