필터 지우기
필터 지우기

How to delete specific rows in a matrix?

조회 수: 1 (최근 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 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