0

我有一个矩阵 X;

   Eigen::MatrixXcf X = Shapes.block(0,0,Shapes.rows(),data.cols()) * std::complex<float>(0,1) +
        Shapes.block(0,data.cols(),Shapes.rows(),data.cols())*std::complex<float>(1,0);

我已经验证 matlab 中的数字符合我的预期。然后我在 Eigen 中进行跟踪。

Eigen::MatrixXcf A =  X.transpose() * X;

现在在matlab中验证数字,A与我在matlab中使用X'X不同。我错过了什么吗?

例子:

(21.5056,-85.0501)(19.9044,-84.2936)(18.0362,-59.8332)(41.4988,-81.8243)(36.6729,-83.0033) ,-47.5751) (88.5798,-58.5984) (82.4639,-58.4872) (93.4947,-37.2525) (105.993,-43.7597) (104.392,-44.2936) (112.198,-26.2848)

> (21.5056,-85.0501) (41.4988,-81.8243) (64.0719,-74.0823) 
> (88.5798,-58.5984) (105 .993,-43.7597) (19.9044,-84.2936)
> (36.6729,-83.0033)  (58.601,-73.3259) (82.4639,-58.4872) 
> (104.392,-44.2936) (18.0362,-59.8332) (38.0295,-56.6073)
> (70.2767,-47.5751) (93.4947,-37.2525) (112 .198,-26.2848)



 (-16735,-9172.05)   (-15034.5,-13329) (-11516.3,-18504.6) (-6910.19,-23175.2)
(-2647.21,-26824.3)
  (-15034.5,-13329) (-12275.9,-17184.7) (-7360.56,-21657.5) (-1502.46,-25378.6)
 (3748.75,-28128.9)
(-11516.3,-18504.6) (-7360.56,-21657.5)   (-650.169,-24774)  (6676.41,-26856.9)
 (13053.4,-28091.3)
(-6910.19,-23175.2) (-1502.46,-25378.6)  (6676.41,-26856.9)  (15145.7,-26993.3)
 (22353.3,-26482.6)
(-2647.21,-26824.3)  (3748.75,-28128.9)  (13053.4,-28091.3)  (22353.3,-26482.6)
   (30153,-24422.5)




Eigen::MatrixXcf B = X.topLeftCorner<3,5>();
Eigen::MatrixXcf C = X.topLeftCorner<3,5>();
B.transposeInPlace();

std::cout << B << std::endl<<std::endl;
std::cout << C << std::endl<<std::endl;
std::cout << B*C << std::endl;
4

1 回答 1

2

是的,X' 是 X 的伴随,即共轭转置,而不仅仅是转置。在本征中:

A = X.adjoint() * X;

或等效地:

A = X.transpose().conjugate() * X;
于 2013-01-28T22:32:52.903 回答