Deleting rows with specific index

Hi all, I want to delete rows with specific index number in my matrix and remove it from the matrix not assigning zero. For example I have a matrix with 400 row and I want to remove the rows with index =[ 6 13 16 25 30 86] What should I do? Thanks

답변 (1개)

per isakson
per isakson 2012년 3월 31일

3 개 추천

Try
Matrix( [6 13 16 25 30 86], : ) = [];
and learn how to use the Matlab documentation

댓글 수: 3

Jan
Jan 2012년 4월 1일
@khatereh: You can ask Google for "matlab delete rows" also. The members of this forum like to solve problems, but if you can do this easily by your own, this would be more efficient.
Kaiyu Shi
Kaiyu Shi 2020년 11월 25일
I googled matlab delete rows and it took me here.
Michael Harris
Michael Harris 2022년 10월 13일
Exactly what helped me drop multiple matrix rows at once ^^^

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

질문:

2012년 3월 31일

댓글:

2022년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by