Determinant of a Binary Matrix
Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 1 Juil 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
le 1 Juil 2018
Modifié(e) : John D'Errico
le 1 Juil 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
le 2 Juil 2018
>> which det(ccc)
/Applications/MATLAB_R2018a.app/toolbox/comm/comm/gf.m % gf method
They use specialized routines .
CharlesB
le 2 Juil 2018
Réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!