converting 2D XY coordinated into Grid format
Afficher commentaires plus anciens
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
Réponses (1)
KSSV
le 1 Avr 2020
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 commentaires
SatyaPrakash Gupta
le 1 Avr 2020
KSSV
le 1 Avr 2020
It looks like your data is scattered......attach your data. Read about griddata. Did you try the second option?
SatyaPrakash Gupta
le 2 Avr 2020
KSSV
le 2 Avr 2020
YOu should use delaunay triangulation......it should be fast enough.
SatyaPrakash Gupta
le 2 Avr 2020
KSSV
le 2 Avr 2020
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
le 2 Avr 2020
Modifié(e) : SatyaPrakash Gupta
le 2 Avr 2020
KSSV
le 2 Avr 2020
Attach your data.
SatyaPrakash Gupta
le 2 Avr 2020
KSSV
le 2 Avr 2020
You can aatach here.
SatyaPrakash Gupta
le 2 Avr 2020
KSSV
le 2 Avr 2020
google drive.
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!