Determinant of a Binary Matrix
Ältere Kommentare anzeigen
Say I have the following binary matrix:
A = [1, 0: 1, 1];
Now I want to find the determinant of this binary matrix.
Det_A = det(gf(A,2)); %in gf(2)
Is this a correct implementation in MATLAB to obtain the determinant of a Binary matrix ?
4 Kommentare
Walter Roberson
am 1 Jul. 2018
Yes, that seems to work.
By the way, you might be interested in the discussion at https://www.mathworks.com/matlabcentral/answers/16192-inversion-of-a-boolean-matrix
John D'Errico
am 1 Jul. 2018
Bearbeitet: John D'Errico
am 1 Jul. 2018
Are you sure that it works? I don't see det overloaded to run on gf arrays in the communication systems TB documentation. So it may have simply converted A back into a double array, then used LU.
I cannot test it with a valid example where the determinants would indeed be different, since I lack that TB. Thus...
A = ones(3) - eye(3);
det(A)
ans =
2
But what does det(gf(A,2)) do in this case?
I do find it claimed here
https://edoras.sdsu.edu/doc/matlab/toolbox/comm/galois8.html
that det is properly written to work on GF arrays. It is still worth testing.
Walter Roberson
am 2 Jul. 2018
>> which det(ccc)
/Applications/MATLAB_R2018a.app/toolbox/comm/comm/gf.m % gf method
They use specialized routines .
CharlesB
am 2 Jul. 2018
Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!