creat a grid from xyz file
Mostrar comentarios más antiguos
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
Respuestas (1)
jonas
el 27 de Ag. de 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 comentarios
wassim boulala
el 27 de Ag. de 2020
jonas
el 28 de Ag. de 2020
surf(XX, YY, ZZ)
wassim boulala
el 28 de Ag. de 2020
jonas
el 28 de Ag. de 2020
Probably you made a mistake, because the code works for me. Upload the data or provide some more information if you want more help.
wassim boulala
el 28 de Ag. de 2020
Editada: wassim boulala
el 28 de Ag. de 2020
wassim boulala
el 28 de Ag. de 2020
jonas
el 28 de Ag. de 2020
Sorry, but this is waste of time. I'll respond when you ask a coherent question.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!