필터 지우기
필터 지우기

Interpolated gridded data with limits

조회 수: 1 (최근 30일)
David du Preez
David du Preez 2020년 11월 20일
댓글: David du Preez 2020년 11월 23일
I have gridded data which I want to plot on a longitude/latitude map. I have used the following code:
pcolor(lon1,S_latitude,sum_pd') %sum_pd' gridded data
shading interp
colormap jet
c = colorbar;
caxis([0 1])
c.Label.String = (['Sensitivity ' species_name ' (' species_unit ')']);
hold on
grid on
borders('countries','k')
But using pcolor interpolate across all longitudes (see image). Is there a way to avoid this or interpolate between a longitude region?

답변 (1개)

KSSV
KSSV 2020년 11월 20일
Don't transpose the ZData. Try:
pcolor(lon1,S_latitude,sum_pd)
If you still face a porblem or if you get an error. Read about inpolygon.
  댓글 수: 3
KSSV
KSSV 2020년 11월 23일
What error it shows?
David du Preez
David du Preez 2020년 11월 23일
The function assumes that assumes that the polygon goes from -50 to 100 and covers the 0 longitude which is the area I want to exclude.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by