Count number of rows without NaNs
Mostra commenti meno recenti
Hi!
I have a 10x2 cell. Each of these cells contains a 10x8 double. I'd like to count all the rows from column 2 (so Data{1,1}(:,2)) which don't have the vale "NaN" and have the value "1" in its row 8 (Data{1,1}(:,8).
What I've tried:
for n = 1:10
Result(:,n) = sum(~isnanData{1,1}(n,2),1(find(Data{1,1}(n,8) == 1)))
end
This seems not to work ("Error: Unbalanced or unexpected parenthesis or bracket.").
Thank you for any help!
Risposta accettata
Più risposte (1)
Image Analyst
il 3 Ott 2014
0 voti
You can't have ,1(find. Why is there a ( right after the 1?????
Categorie
Scopri di più su NaNs in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!