How to delete specific rows in a matrix?

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Numeric Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by