Hello everybody,
I have a Matrix of different measurements and in the 6th column it shows me erorrs. Every value in this column except of 0 shows me that the measurements are wrong. How can I clear out the lines with the errors?
Thanks
Lucas

3 件のコメント

Adam
Adam 2017 年 11 月 27 日
What do you mean by errors? An error in Matlab usually refers to a syntax or run-time error on a line of code, you can't have an error within elements of a matrix. Do you mean NaNs?
Lucas MacClellan
Lucas MacClellan 2017 年 11 月 27 日
Hi Adam
Sorry maybe not good explained. The title of the column is "error". It shows me a lot of 0s which are showing me that the measurements of the lines are fine. Sometimes there comes a 1 which is saying to me, that this line is not useful.
Adam
Adam 2017 年 11 月 27 日
Ah, ok, yes, that makes sense. The original explanation is perfectly good enough now, I just got off on the wrong track with my interpretation of 'error'!

サインインしてコメントする。

 採用された回答

Adam
Adam 2017 年 11 月 27 日

0 投票

badRowIdx = find( results( :,6 ) == 1 );
results( badRowIdx, : ) = [];
should remove these lines.

1 件のコメント

Lucas MacClellan
Lucas MacClellan 2017 年 11 月 27 日
Thank you! Thats what I wanted

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by