creat a grid from xyz file

20 vues (au cours des 30 derniers jours)
wassim boulala
wassim boulala le 27 Août 2020
Commenté : jonas le 28 Août 2020
Hi!
I have a file of X,Y,Z values (X,Y are cartesian coordinates) and Z the altitude (it's a topo-bathymetry file).
can you tell me please how to creat a grid which contains this altitudes .
thank you

Réponses (1)

jonas
jonas le 27 Août 2020
%make a 100x100 grid
[XX,YY] = meshgrid(linspace(min(X),max(X),100),linspace(min(Y),max(Y),100))
%interpolate Z data to grid
ZZ = griddata(X,Y,Z,XX,YY)
  8 commentaires
wassim boulala
wassim boulala le 28 Août 2020
how can i do a graph in 2D (X,Y) ?
i think that works.
jonas
jonas le 28 Août 2020
Sorry, but this is waste of time. I'll respond when you ask a coherent question.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by