简体   繁体   English

如何在Matlab中找到X矩阵的元素?

[英]How can I find the elements of the X matrix in Matlab?

当我在Matlab中得到X(transpost)与X.(非埃尔米特矩阵)的乘积时,如何找到X矩阵的元素?

X'*X = [ 10+2*i  2+3*i  90+5*i ; 2+36*i 56-3*i 52+37*i  ; 8+13*i   20+13*i  20-9*i ]

Option #1 - fsolve 选项1 - fsolve

Use fsolve - see example 2 . 使用fsolve-参见示例2

Option #2 - solve 选项#2- solve

  1. You have n^2 variables {a_ij} [i,j = 0,...,n] each variable corresponds to a matrix entery. 您有n^2变量{a_ij} [i,j = 0,...,n]每个变量对应一个矩阵Entery。
  2. for each one of the variable in A'*A define an eqution and solve the n^2 equations. A'*A每个变量定义一个方程并求解n^2方程。 eg A11^2 +A12*A21 +A13*A31 = 10+2*i . 例如A11^2 +A12*A21 +A13*A31 = 10+2*i using symbolic variable and solve function 使用符号变量和求解函数

>> s = solve(a^2+3 ==5, u+v+a ==32, a*u==1)

s = 

    a: [2x1 sym]
    u: [2x1 sym]
    v: [2x1 sym]

>> s.a

ans =

  2^(1/2)
 -2^(1/2)

>> s.v

ans =

 32 - (3*2^(1/2))/2
 (3*2^(1/2))/2 + 32

>> s.u

ans =

  2^(1/2)/2
 -2^(1/2)/2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM