I have a matrix and I want to delete all rows that have ZEROS from columns 3 to end. How do?

 채택된 답변

dpb
dpb 2013년 10월 2일
편집: dpb 2013년 10월 2일

1 개 추천

x(~any(x(:,3:end),2),:)=[];

추가 답변 (1개)

Andrei Bobrov
Andrei Bobrov 2013년 10월 2일
편집: Andrei Bobrov 2013년 10월 2일

1 개 추천

out = x(all(x(:,3:end),2),:);

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2013년 10월 2일

편집:

2013년 10월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by