MATLAB: How to delete specific rows in a matrix

deleting rows

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.

Best Answer

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