フィルターのクリア

How to do inverse matrix (binary from ) in matlab ?

55 ビュー (過去 30 日間)
z m
z m 2017 年 11 月 18 日
コメント済み: z m 2017 年 11 月 19 日
Hello, I have this matrix in binary from
Q =
0 0 1
1 0 0
0 1 0
and I wants to get the inverse matrix (binary form) in matlab? how to do it? i use this Q_inv=inv(Q) to get inverse Q
Q_inv =
0 1 0
0 0 1
1 0 0
Is this Q_inv=inv(Q) is correct for inverse binary matrix ? if no, how to do it?
  2 件のコメント
Roger Stafford
Roger Stafford 2017 年 11 月 18 日
That is the true inverse of Q. If you doubt that try this:
Q*Q_inv
You will get the 3x3 identity matrix as a result. That proves that Q_inv is the correct inverse.
z m
z m 2017 年 11 月 19 日
Thank you.

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2017 年 11 月 18 日
To invert values by turning 0s into 1s and 1s into 0s, use tilde:
Q = ~Q;
  2 件のコメント
Roger Stafford
Roger Stafford 2017 年 11 月 18 日
@Image Analyst: I disagree. Even on zm's example with Q, doing the negation operation does not create the multiplicative inverse. Try multiplying Q*(~Q) and you will see.
Image Analyst
Image Analyst 2017 年 11 月 18 日
Roger, in the image processing community, inverting a binary image means what I said. It's very very common jargon. People use it all the time.
It's not clear whether "z m" meant the inverse (or "complement") of a binary image matrix, OR the traditional matrix inverse like you'd do with any matrix. That's why I offered the alternative interpretation.

サインインしてコメントする。


Walter Roberson
Walter Roberson 2017 年 11 月 18 日

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by