How to delete specific rows in a matrix?

1 vue (au cours des 30 derniers jours)
Elaheh
Elaheh le 6 Mai 2018
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.

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Mai 2018
NewMatrix = YourMatrix(YourMatrix(:,1)~=0, :);

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by