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.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 6 Mai 2018

1 Stimme

NewMatrix = YourMatrix(YourMatrix(:,1)~=0, :);

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by