Matrix manipulation by function
이전 댓글 표시
Dear all, For a given matrix (square) i need to eliminate some elements (some rows and columns)
A =
35 6 19
3 7 23
31 2 27
I need only the second (not the first and the third) row and column : the eliminated are stocked in a vector
B = (1 3)
So : some function (A, B) :::> the result C = 7
function (A, B) = C
채택된 답변
추가 답변 (1개)
Fangjun Jiang
2017년 4월 6일
C=A;
C(B,:)=[];
C(:,B)=[]
댓글 수: 3
Andrei Bobrov
2017년 4월 6일
Hi Fangjun!
Jan
2017년 4월 7일
Yes, hi Fangjun!
Fangjun Jiang
2017년 4월 7일
Hello, friends!
카테고리
도움말 센터 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!