How to maintain NaN after calculations in tables?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
James Wong
le 17 Oct 2019
Commenté : James Wong
le 17 Oct 2019
Sorry this is the first time I have posted a question.
I am trying to create a new column in my table using parameter like (rows = T.Age < 40). This creates a logical array of the same size as the original column, but when I create the new column and use T.new(:,:)=T.height(rows). It won't add the new column because the array is now smaller due to NaNs in my table.
How do i keep the NaN values and have it carry over and create a new column?
0 commentaires
Réponse acceptée
Walter Roberson
le 17 Oct 2019
T.new(rows) = T.height(rows);
nanrows = isnan(T.Age);
T.new(nanrows) = nan;
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!