1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Help solve matrix math matlab

  1. May 13, 2013 #1
    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: May 13, 2013
  2. jcsd
  3. May 13, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    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,


    is what you're looking for. This returns a matrix H that has the property you want and also is lower diagonal
  4. May 13, 2013 #3

    see update
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted