Replace a scaler with NaN

1 visualización (últimos 30 días)
Allie
Allie el 8 de Mzo. de 2019
Respondida: Fangjun Jiang el 8 de Mzo. de 2019
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.96921*10^(36))=nan;
or
E(E==-9.96921e36) = nan

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 8 de Mzo. de 2019
https://www.mathworks.com/matlabcentral/answers/57444-faq-why-is-0-3-0-2-0-1-not-equal-to-zero

Categorías

Más información sobre NaNs en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by