How can I identify the indices of rows containing all NaNs from matrix?
Afficher commentaires plus anciens
I have very large matrices, in which some rows contain all NaN. I don't want to remove these rows. But I wish to identify which index contains all NaN. I have seen code for removing such rows, but how can I extract the index value?
I am not very familiar with MATLAB. Thanks in advance.
Réponse acceptée
Plus de réponses (1)
Chandrasekhar
le 31 Mai 2017
% idenfity NaN's in the matrix
k = isnan(a);
% find the indices of NaN's
find(k==1);
1 commentaire
Deepa T
le 1 Juin 2017
Catégories
En savoir plus sur Logical 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!