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

9 views (last 30 days)
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

Answers (1)

Leo Duan
Leo Duan on 21 Apr 2021
Edited: Leo Duan on 21 Apr 2021
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;

Tags

Community Treasure Hunt

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

Start Hunting!