Matrix manipulation by function
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Fangjun Jiang
am 6 Apr. 2017
C=A;
C(B,:)=[];
C(:,B)=[]
3 Kommentare
Andrei Bobrov
am 6 Apr. 2017
Hi Fangjun!
Jan
am 7 Apr. 2017
Yes, hi Fangjun!
Fangjun Jiang
am 7 Apr. 2017
Hello, friends!
Kategorien
Mehr zu Operators and Elementary Operations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!