行列の順列行列を見つけることができるMATLABコードを作成しようとしています。Matlab:別の行列を生成する順列行列を見つける
以下の例を考えてみましょう。私は行列A
とB
与えられている:
A = [1 2 3;4 5 6; 7 8 9] % is a given matrix
B = [9 7 8;3 1 2; 6 4 5] % is a permuted version of A.
私の目標は、行列を見つけることですL
(その前の乗算A
)とR
(そのポスト乗算A
)などL*A*R = B
こと:
% L is an n by n (3 by 3) that re-order the rows a matrix when it pre-multiply that matrix
L = [0 0 1;1 0 0;0 1 0]
% R is an n by n that re-order the columns of a matrix
R = [0 1 0;0 0 1;1 0 0]
B = L*A*R
A
とB
を知っているときにL
とR
を見つけるにはどうすればいいですか?ここでは、ベースライン溶液を得
これはhttp://math.stackexchange.com/の方が適切でしょう。 – Paul