필터 지우기
필터 지우기

Smoothing contour plot of isotherm

조회 수: 4 (최근 30일)
주희 박
주희 박 2022년 2월 16일
댓글: DGM 2022년 2월 17일
Hi i have an argo data and I'm trying to make isotherm line. I choose 1999~2004 winter data and interpolation 1m.
And I want to more smooth isotherm line. Additionally, I'm so beginner of matlab. Thank you for considering.
  • And Zi has NaN values, I guess this is cause. Why my zi has NaN......
  댓글 수: 1
AndresVar
AndresVar 2022년 2월 17일
I have question about removing nan from b. The shape of b is 2D right? Otherwise it could have large discontinuity.
Instead of interp1 you could try the Damien Garcia's inpaint (for 2D b):
Or
I am not familiar for why griddata gives you nan, could it be because b is not smooth and has very large noise.

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

채택된 답변

DGM
DGM 2022년 2월 17일
I don't have your data, and your code is a picture, so I can't do anything with it.
That said, it looks like the problem is merely the size of the ZData.
Consider the example:
Z = peaks(10); % a very small array
contourf(Z,10);
figure
Z = peaks(100); % a larger array
contourf(Z,10);
You should be able to change this resolution by reducing the stepsize when you generate the Xp and Yp vectors.
  댓글 수: 2
주희 박
주희 박 2022년 2월 17일
Wow It's simple and very useful method! Thank you so much!!
DGM
DGM 2022년 2월 17일
If you find that the answer satisfies your question to your satisfaction, you can click Accept. That way the question will be moved to the "answered" queue, where it may be more valuable to the next person searching for help with a similar problem.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by