Deleting specific Rows in a matrix
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
Hi,
I have a matrix "A" that is 350x1 matrix, so it is a very large matrix. This matrix has about 40 rows that I want to remove. I know these rows and they are stored in another matrix "B", which is a 40x1 matrix. How do I delete the rows that are listed in matrix "B" from matrix "A"?
댓글 수: 0
채택된 답변
  Joseph Cheng
      
 2014년 4월 7일
        you can do this
A(B)=[];
This will delete the rows from A given the numbers that are stored in B.
댓글 수: 0
추가 답변 (1개)
  Ondrej Budac
 2014년 4월 7일
        If your matrix B has the row indices, it suffices to write
A(B) = [];
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!