Converting gridded elevation data and x, y coords into row output

조회 수: 2 (최근 30일)
Wthee
Wthee 2020년 9월 20일
댓글: Walter Roberson 2020년 9월 23일
We are dealing with UTM coords here, and we have: Northings, Eastings, and gridded Elevation-values.
dimensions--
x is 1x30
y is 1x41
z is 41x30
Currently this meshes well into a surface.
How can I export this data into rows of:
x1, y1, z1;
x2,y2,z2;
....
xend,yend,zend
?
  댓글 수: 3
Wthee
Wthee 2020년 9월 23일
Here's a followup...
Do you know if there is a way to have contour outputs at certain z values? E.g., somehow setting z = 0 and finding all x,y coords that intersect that plane? I'm guessing there would have to be interpolation involved?
Walter Roberson
Walter Roberson 2020년 9월 23일
You can pass a level list to contour() . If you are only passing one value, then the trick is to pass it twice:
contour(x, y, z, 2) %asks for two contours
contour(x, y, z, [2 2]) %asks for a contour at z = 2
Interpreting the contour matrix that you can return from contour() is a nuisance. There are some File Exchange submissions that make it easier.

댓글을 달려면 로그인하십시오.

채택된 답변

David Hill
David Hill 2020년 9월 20일
Not sure I understand your question.
[X,Y]=meshgrid(x,y);%assume this is what you want
data=[X(:),Y(:),z(:)];
  댓글 수: 5
Wthee
Wthee 2020년 9월 20일
Good Work -- David and Walter... much appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Geodesy에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by