NaN with 1334x2 double
Afficher commentaires plus anciens
Im getting a NaN value for a 1334x2 double when I try to integrate with the trapz() function. Next I tried mean() out of good measure and it also returned NaN. Any thoughts? Data set too large?
4 commentaires
dpb
le 30 Avr 2019
More like there's a NaN already in the data array you're unaware of because it's such a large array can't easily inspect every element.
Try (and report back) what
sum(isfinite(X))==numel(X)
and/or
sum(isnan(X))
return.
First will be logical T/F; second will actually be the number of NaN in the array...if first -->T then second will be zero and we'll have to dig deeper, but this is what the crystal (that has been on a roll recently) is saying...
Austin Swirsky
le 30 Avr 2019
dpb
le 1 Mai 2019
Ayup...as suspected.
[r,c]=find(isnan(X))
will tell you the row, column containing it...
Now, what you do about it is all dependent upon what it means to have such and how you want to treat it...
Austin Swirsky
le 1 Mai 2019
Réponses (0)
Catégories
En savoir plus sur NaNs dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!