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

3 Stimmen

rows = any(isnan(myMatrix),2);
myMatrix(rows,:) = [];

Weitere Antworten (0)

Gefragt:

am 21 Apr. 2015

Beantwortet:

am 21 Apr. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by