find inverse of a non square binary matrix in matlab
Show older comments
Hi,
I have used a couple of functions to find the inverse of a non-square boolean matrix in matlab. Here is a list of them : using :
inverse_g=mod(floor(mrdivide(I,A)),2);
inverse_g=I\A;
pinv(double(A));
I have tried to verify if the matrix obtained satisfies the property A*inv(A)=inv(A)*A=I
I have found that none of the properties are satisfied. I am not sure because this is a non square matrix if this property still holds good. Since I am using this inverse for processing later on I am sure that the obtained inverse is not correct. Can someone point me to the right direction ?
Thanks, Bhavya
2 Comments
Image Analyst
on 4 Feb 2012
Can you give us the context - the larger picture? Usually when someone says inverse regarding a binary (logical, boolean) matrix, then mean this invertedMatrix = ~logicalMatrix. I don't think you can take the matrix inverse of a non-square matrix, like you are trying to do. That's why I want to know why you think you want to do that.
Bhavya PH
on 5 Feb 2012
Answers (1)
Walter Roberson
on 4 Feb 2012
0 votes
2 Comments
Bhavya PH
on 5 Feb 2012
Walter Roberson
on 5 Feb 2012
No, you cannot use the "usual way" to invert it, not if what you want to get out is a boolean matrix. The steps are similar, but you need to interpret '+' as XOR and you need to interpret '*' as AND .
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!