Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Possible to contour at specific z planes to give the x,y coords?
조회 수: 1 (최근 30일)
이전 댓글 표시
Here's a followup from a previous question... https://www.mathworks.com/matlabcentral/answers/596671-converting-gridded-elevation-data-and-x-y-coords-into-row-output
Given these vectors:
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
and Given this code:
[X,Y]=meshgrid(x,y);%assume this is what you want
dataTemp=[X(:),Y(:),z(:)];
data = rmmissing(dataTemp)
The Followup question:
Is there 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?
댓글 수: 0
답변 (1개)
KSSV
2020년 9월 24일
You can use contour to do this. You need to specify the level as 0 to get your coordinates (x,y) where Z = 0.
C = contour(X,Y,Z,[0 0]) ;
댓글 수: 4
Walter Roberson
2020년 10월 1일
contour3 and provide the level list. The graphics objects that result will have ZData properties corresponding to the z level; regular contour() sets the ZData to 0. XData and YData coordinates give you the edges.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!