creat a grid from xyz file

39 次查看(过去 30 天)
wassim boulala
wassim boulala 2020-8-27
评论: jonas 2020-8-28
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

回答(1 个)

jonas
jonas 2020-8-27
%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 个评论
wassim boulala
wassim boulala 2020-8-28
how can i do a graph in 2D (X,Y) ?
i think that works.
jonas
jonas 2020-8-28
Sorry, but this is waste of time. I'll respond when you ask a coherent question.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Directed Graphs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by