MATLAB Answers

Is griddedinterpolant omits NaN?

7 views (last 30 days)
Behzad Navidi
Behzad Navidi on 27 Mar 2020
Answered: darova on 27 Mar 2020
Hey all, I want to know when we using griddedinterpolant while we have some NaN in our data set, are they NaNs fills by griddedinterpolant? Or they remain as NaN?

  0 Comments

Sign in to comment.

Accepted Answer

darova
darova on 27 Mar 2020
You can find out by yourself
[X,Y] = meshgrid(0:10);
Z = 0*X;
Z(5:7,5:7) = nan;
surf(X,Y,Z,'edgecolor','none')
[X1,Y1] = meshgrid(0:0.4:10);
Z1 = griddata(X,Y,Z,X1,Y1);
hold on
surf(X1,Y1,Z1,'facecolor','none')
hold off

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products


Release

R2018b