How to delete specific rows in a matrix?

2 ビュー (過去 30 日間)
Elaheh
Elaheh 2018 年 5 月 6 日
回答済み: Walter Roberson 2018 年 5 月 6 日
Hello all, I have a matrix including two columns and some rows. I have numbers and zeros in the first column and numbers and empty slots in the second column.How can I delete zeros in the first column and their corresponding empty slots in the second column? Thank you in advance.

採用された回答

Walter Roberson
Walter Roberson 2018 年 5 月 6 日
NewMatrix = YourMatrix(YourMatrix(:,1)~=0, :);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by