Row reduction using modular arithmetic
이전 댓글 표시
I'm looking to row reduce an augmented matrix mod 2.
Is there any way to do this using the rref function? Say I have a matrix A, I've tried the operation,
A = mod(rref(A),2)
but with no success. Is there any way to ammend this, or possibly work around this with a different function?
Thank you!
채택된 답변
추가 답변 (1개)
Walter Roberson
2019년 1월 23일
0 개 추천
No, it cannot be done using rref().
However rref.m is fairly straight foward code, and you could potentially copy it to a new function and edit that for your purposes.
댓글 수: 2
John D'Errico
2019년 1월 23일
With the minor caveat that you need to use a modular inverse, because you will be dividing by a pivot element. In mod 2, that is not an issue, since your pivot element will never be 0, and in mod 2 arithmetic, the only other choice is 1. And 1 is its own inverse in mod 2 arithmetic. Things get terribly easy in mod 2.
Walter Roberson
2019년 1월 23일
See also binary inverse at https://www.mathworks.com/matlabcentral/answers/16192-inversion-of-a-boolean-matrix
카테고리
도움말 센터 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!