[求助]给定矩阵A,如何用matlab求解出所有的最高阶非零子式
给定矩阵A,如何用matlab编程求解出所有的最高阶非零子式?
A=[ 1 -2 2 3;
-2 4 -1 3;
-1 2 0 3;
0 6 2 3;
2 -6 3 4];
[R,C] = size(A);
Rank = rank(A);
count = 0;
for i = 1 : R-Rank+1
for j = 1 : C-Rank+1
B = A(i:i+Rank-1,j:j+Rank-1);
if rank(B)>0
B
count = count + 1;
end
end
end
count