Determinant of a Binary Matrix

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 comentarios

Walter Roberson
Walter Roberson el 1 de Jul. de 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
John D'Errico el 1 de Jul. de 2018
Editada: John D'Errico el 1 de Jul. de 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.
>> which det(ccc)
/Applications/MATLAB_R2018a.app/toolbox/comm/comm/gf.m % gf method
They use specialized routines .
CharlesB
CharlesB el 2 de Jul. de 2018
thank you walter :)

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Preguntada:

el 1 de Jul. de 2018

Comentada:

el 2 de Jul. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by