MATLAB Answers

creat a grid from xyz file

43 ビュー (過去 30 日間)
wassim boulala
wassim boulala 2020 年 8 月 27 日
コメント済み: jonas 2020 年 8 月 28 日
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 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 件のコメント
jonas 2020 年 8 月 28 日
Sorry, but this is waste of time. I'll respond when you ask a coherent question.


Community Treasure Hunt

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

Start Hunting!

Translated by