Check all values in a table if any is "NAN"
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zeynab Mousavikhamene
le 8 Oct 2019
Réponse apportée : the cyclist
le 8 Oct 2019
I have a table that has multiple column and rows. I want to say if any value in the table was "NAN" then change the value from "NAN" to 1.
Any suggestion?
2 commentaires
Rik
le 8 Oct 2019
This is not your first question. What have you tried so far on your own? And are you aware of the isnan function?
Réponse acceptée
the cyclist
le 8 Oct 2019
This may work for your case
tbl = fillmissing(tbl,'constant',1);
assuming the NaNs are the only values that count as missing for you.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!