Help solve matrix math matlab

  • Thread starter Badger33
  • Start date
  • #1
36
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:

Answers and Replies

  • #2
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
4,639
651
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
 
  • #3
36
0
reply

see update
 

Related Threads on Help solve matrix math matlab

Replies
1
Views
5K
Replies
3
Views
5K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
8
Views
4K
  • Last Post
Replies
2
Views
1K
Replies
3
Views
2K
  • Last Post
Replies
10
Views
1K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
0
Views
1K
Top