MATRIX COFACTOR
411 次查看(过去 30 天)
显示 更早的评论
I need to know a function to calculate the cofactor of a matrix, thank a lot!
7 个评论
Walter Roberson
2021-10-8
I suspect that the English word would be "minor". The Spanish word "menor" can be translated as English "minor" in some situations.
采纳的回答
更多回答(2 个)
Dr. Murtaza Ali Khan
2019-9-28
A = [
2 4 1
4 3 7
2 1 3
]
detA = det(A)
invA = inv(A)
cofactorA = transpose(detA*invA)
2 个评论
Franco Salcedo Lópezz
2019-11-14
编辑:Franco Salcedo Lópezz
2019-11-14
Here I leave this code, I hope it helps. Regards
function v = adj(M,i,j)
t=length(M);
v=zeros(t-1,t-1);
ii=1;
ban=0;
for k=1:t
jj=1;
for m=1:t
if ( (i~=k)&&(j~=m) )
v(ii,jj)=M(k,m);
jj++;
ban=1;
endif
endfor
if(ban==1)ii++;ban=0;endif
endfor
Francisco Trigo
2020-2-6
The matrix confactor of a given matrix A can be calculated as det(A)*inv(A), but also as the adjoint(A). And this strange, because in most texts the adjoint of a matrix and the cofactor of that matrix are tranposed to each other. But in MATLAB are equal. I found a bit strange the MATLAB definition of the adjoint of a matrix.
1 个评论
Zuhri Zuhri
2021-9-28
adjoint matrix is the transpose of the cofactor matrix so the above result is correct
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!