How does tilde remove NaN's from dataset?
Ältere Kommentare anzeigen
Given a C = m x n matrix of 1's and 0's, and a data set B = r x s with NaN's mixed in with numeric data, how do I use the tilde to remove the NaN's? I have seen this in an example:
A=B(~C,:); and it worked in the example.
I cannot recreate it in a different problem. I also cannot find any explanation in any Mathworks information that explains it.
Akzeptierte Antwort
Weitere Antworten (1)
Rick Rosson
am 3 Mär. 2014
Is this what you are trying to do?
C = isnan(B);
A = B(~C);
1 Kommentar
Ralph
am 3 Mär. 2014
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!