Extrapolating one contour level

조회 수: 4 (최근 30일)
Wthee
Wthee 2020년 10월 10일
댓글: Wthee 2020년 10월 12일
I'm having difficulty with my z = 0 contour level.
%x is 1 x 30
%y is 1 x 41
%z is gridded elevation data
[xx,yy] = meshgrid(x,y)
zz=griddata(x,y,z,xx,yy);
a= contour3(xx,yy,zz,0:-3:-18);
I'm taking the contours from the different levels in the contour3 outputs (shown above: 0,-3, -6, ..., -18) and then processing that. My issue is that the contour at z = 0 is very incomplete and I only have discrete patches of data (in other words, there are too few vertices at this level), which won't work for me.
I've tried nearest neighbor with griddata, that doesn't help fill out the z = 0 contour.
It's absolutely a contour level that I need to be continuous.
Is there a way to extrapolate that level so I have have the whole contour without discrete interruptions?
  댓글 수: 10
Bjorn Gustavsson
Bjorn Gustavsson 2020년 10월 12일
So to the resolution of your plots there seems to be no data with z < 0. If that's the case you will most likely never get any sensible 0-level contour from the triangulation. Try instead for a contour-line at some small positive value, lets say 0.1, 0.2. That might be the lowest level for which you might get a sensible contour-line.
Wthee
Wthee 2020년 10월 12일
The fit tool works like a marvel, under the curve fitting toolbox.
Thanks for you help!

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by