Why do I get error message :"error using contourc. Countour values must be finite" ?

I have MATLAB R2017a. When I open contourplots from Matlab R2010 they look fine but I cannot save them due to the above error message. How to fix that?
Thanks

回答 (1 件)

Leo Duan
Leo Duan 2021 年 4 月 21 日
編集済み: Leo Duan 2021 年 4 月 21 日
I just encountered the same problem
looking into the Z-matrix of contour plot, I found there is a Inf.
Remove this Inf (set to zero or NaN) then everything works well for me, for example
z(isinf(z)) = nan;

1 件のコメント

Adam Danz
Adam Danz 2021 年 4 月 21 日
Please include the code used to replace inf values with 0s or NaNs to show the solution.

サインインしてコメントする。

タグ

質問済み:

2019 年 1 月 31 日

編集済み:

2021 年 4 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by