How to eliminate rows with NaN elements?

4 Ansichten (letzte 30 Tage)
Mr M.
Mr M. am 21 Apr. 2015
Beantwortet: James Tursa am 21 Apr. 2015
If there is at least one NaN value in a row, I would like to delete that row from my matrix.

Akzeptierte Antwort

James Tursa
James Tursa am 21 Apr. 2015
rows = any(isnan(myMatrix),2);
myMatrix(rows,:) = [];

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by