I have a 41x5x2001 matrix (E) with the value -9.96921e+36 scattered throughout. I would like to replace this with NaN. I tried the code below, which has worked for me when replacing zeros with NaN, but it isn't working now. What am I doing wrong?
E(E==-9.96921e36) = nan