Arranging of variable submatrices into main matrix results in forming cos(conj(theta))
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Bathala Teja
le 8 Sep 2021
Commenté : Bathala Teja
le 8 Sep 2021
In my script, i formed matrices G_ss, G_sr, Grs, Grr(all are 3*3) in terms of theta.
i am doing differentiation operation w.r.t theta for all matrices then i am getting Gd_ss, Gd_sr, Gd_rs, Gd_rr matrices after differentiation.
Finally i am forming single matrix G = [Gd_ss Gd_sr; Gd_rs Gd_rr]
I have to get G matrix interms of theta. But in the result it is showing cos(conj(theta)), sin(conj(theta))......etc, terms instead of cos(theta), sin(theta).
Where it went wrong i dont know.
Even after differentiation operation, Gd_ss, Gd_sr, Gd_rs, Gd_rr matrices are in theta only not like conj(theta).
After forming G only it is showing conj(theta). How to rectify this??
0 commentaires
Réponse acceptée
Walter Roberson
le 8 Sep 2021
Somewhere in your calculation, you have the ' (conjegate transpose) operator instead of the .' (non-conjugate transpose) operator.
If you are doing linear algebra, expecially with some kinds of physics, it is not uncommon that using ' (conjugate transpose) operator is mathematically correct. For example, you might have
W'*X*W
and if so then mathematically the conjugate transpose is typically the appropriate operator there.
Now, if you happen to be working with a system in which you are certain that none of the values can be complex-valued, then you can avoid the difficulty of seeing conj() by telling MATLAB that your symbolic variables are real-valued, such as
syms theta real
I recommend that you routinely tell MATLAB that symbolc variables are real-valued if you know that to be true: when MATLAB can reason that a value is surely real-valued then it will remove the conj()
3 commentaires
Walter Roberson
le 8 Sep 2021
Right, syms theta real will help.
Note that if you have any acos() or asin() then MATLAB might not be able to prove that the argument is strictly in the range -1 to +1 so you might still see a conj()
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Assumptions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!