How do I solve for H in matlab?

  • Thread starter Thread starter Badger33
  • Start date Start date
  • Tags Tags
    Matlab Matrix
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
Badger33
Messages
34
Reaction score
0
I need help implementing this bit of code into matlab. I have a known matrix lest call it Z. and I have another unknown matrix called H. The matrices are related by the following relationship.

Z = HTH

How do I solve for H in matlab? If it is relevant Z is a make up of other known matrices and that code in MATLAB is:

Z = A + 2*eye(n)

where A is the initial known matrix and n is just an integer.UPDATE: Yes A and Z will always be positive.
 
Last edited:
Physics news on Phys.org
As an initial observation Z has to be symmetric and positive definite to do this, which puts restrictions on A. Assuming that this is true,

http://www.mathworks.com/help/matlab/ref/chol.html

is what you're looking for. This returns a matrix H that has the property you want and also is lower diagonal