creat a grid from xyz file
이전 댓글 표시
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
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
2020년 8월 27일
jonas
2020년 8월 28일
surf(XX, YY, ZZ)
wassim boulala
2020년 8월 28일
jonas
2020년 8월 28일
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
2020년 8월 28일
편집: wassim boulala
2020년 8월 28일
wassim boulala
2020년 8월 28일
jonas
2020년 8월 28일
Sorry, but this is waste of time. I'll respond when you ask a coherent question.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!