Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How do I delete rows from a matrix based on the number of the row.
조회 수: 1 (최근 30일)
이전 댓글 표시
I have matrix A=[ 15 2 4; 19 3 7; 12 2 6; 10 4 9]
A second matrix which tells me the rows of A that need to be deleted.
BadA= [ 1; 3 ]
My matrices are much bigger but for right now this kind of simulation on smaller matrices will work.
Thank you
댓글 수: 0
답변 (1개)
Star Strider
2017년 9월 1일
Assign the rows that need to be deleted to the empty array ‘[]’:
A = [ 15 2 4; 19 3 7; 12 2 6; 10 4 9]
BadA= [ 1; 3 ];
A(BadA,:) = []
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!