I have H and G and Am matrix. All are 4x4. Both H and G are symmetrical and next equation: HAm+AmH=-G. How can I solve this in matlab? Am I right about this: 2HAm=-G and 2AmH=-G?
But when I use H=linsolve(Am,-G/2) gives me nonsymmetrical matrix
H=linsolve(Am,-G/2)
ABis usually not the same asBA, so combining the terms above like you see in your post is not valid matrix mathematics. Also usinglinsolveassumes that your problem is of the formAX = B.Xis implicitly aN x 1matrix. If you're saying thatHis 4 x 4, then you can't uselinsolve. Please update your problem to include more information. This is unsolvable in its current state. - rayryenglyap()which would be recommended. - patrik