Hi folks! I need some help (Though I have a doubt whether this is an appropriate question for this group).
Can you please help me to solve this equation: AB=A, where A is a known symmetric, singular matrix. And diagonal elements of B are also known.
For clarification: All elements of A is known. And only diagonal elements of B are known. As an example, you can consider: [1 -1/2 -1/2; -1/2 1 -1/2; -1/2 -1/2 1] and diag B=[ 3 3 3].
Thanks in advance.

6 件のコメント

KSSV
KSSV 2020 年 8 月 17 日
Show us A and B.
Vladimir Sovkov
Vladimir Sovkov 2020 年 8 月 17 日
Maybe, a kind of a general optimization procedure can be employed with the off-diagonal elements of B chosen as the variables to be optimized. If only the exact solution exists at all, which is not clear. I believe, our Optimizer package can help, see it at https://sourceforge.net/projects/optimizer-sovkov/.
Sara Boznik
Sara Boznik 2020 年 8 月 17 日
Is B=I?
Walter Roberson
Walter Roberson 2020 年 8 月 17 日
編集済み: Walter Roberson 2020 年 8 月 17 日
Is all of B known or just the diagonal elements? Is B all zero except at some diagonal elements?
When you describe A I am not sure whether you are saying that all of the elements of A are known, or if what is known about it is that it is symmetric and singular?
Suvranil
Suvranil 2020 年 8 月 17 日
All elements of A is known. And only diagonal elements of B are known. As an example, you can consider: [1 -1/2 -1/2; -1/2 1 -1/2; -1/2 -1/2 1] and diag B=[ 3 3 3].
Bruno Luong
Bruno Luong 2020 年 8 月 17 日
See my code below that gives
B =
3.0000 2.0000 2.0000
2.0000 3.0000 2.0000
2.0000 2.0000 3.0000

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

 採用された回答

Bruno Luong
Bruno Luong 2020 年 8 月 17 日
編集済み: Bruno Luong 2020 年 8 月 17 日

1 投票

% Generate testexample of A, B (n x n) matrix such that A*B=A
% Here A is generated to be symmetric but it doesn't matter
n = 5;
C = rand(n,1)*rand(1,n);
K = null(C);
A = K*K.';
B = C.' + eye(n)
% INPUT
dB = diag(B);
clear B
% Reconstruct (off-diagonal elemenst of) B from A and dB
X = A.*(1-dB(:).');
n = size(A,2);
B = diag(dB);
for j=1:n
i = [1:j-1,j+1:n];
B(i,j) = A(:,i) \ X(:,j);
end
B

その他の回答 (0 件)

カテゴリ

質問済み:

2020 年 8 月 17 日

コメント済み:

2020 年 8 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by