Split Jacobian result into Matrix factors
古いコメントを表示
Hello,
I'm using the symbolic toolbos to calculate the following Jacobian:
jacobian(A4,phi_)
where
A4 = - TLB*R*TLB2*w
with

The result of jacobian(A4,phi_) calculated by Matlab is
[wz*(r2 + psi*r5 - r8*theta) - wy*(r3 + psi*r6 - r9*theta), wy*(r8 + phi*r9 - psi*r7) - wz*(r1 - r9 + phi*r8 + psi*r4 - 2*r7*theta) + wx*(r3 + r7 + psi*r6 + psi*r8 - 2*r9*theta), - wz*(r6 - phi*r5 + r4*theta) - wy*(r5 - r1 + phi*r6 - 2*psi*r4 + r7*theta) - wx*(r2 + r4 + 2*psi*r5 - r6*theta - r8*theta)]
[ - wx*(r7 + psi*r8 - r9*theta) - wz*(r9 - r5 - 2*phi*r8 + psi*r2 + r7*theta) - wy*(r6 + r8 + 2*phi*r9 - psi*r3 - psi*r7),wx*(r6 + phi*r9 - psi*r3) - wz*(r4 + phi*r7 - psi*r1), wz*(r3 - phi*r2 + r1*theta) - wx*(r5 - r1 + phi*r8 - 2*psi*r2 + r3*theta) + wy*(r2 + r4 + phi*r3 + phi*r7 - 2*psi*r1)]
[ wx*(r4 + psi*r5 - r6*theta) - wy*(r9 - r5 - 2*phi*r6 + psi*r4 + r3*theta) + wz*(r6 + r8 - 2*phi*r5 + r2*theta + r4*theta), - wy*(r2 + phi*r3 - psi*r1) - wx*(r1 - r9 + phi*r6 + psi*r2 - 2*r3*theta) - wz*(r3 + r7 - phi*r2 - phi*r4 + 2*r1*theta), wy*(r7 - phi*r4 + r1*theta) - wx*(r8 - phi*r5 + r2*theta)]
which as you can see isn't very nice looking.
My question is if I can somehow turn this result into a product of my original matrices (if even mathematically possible),
for example ans = TLB*TLB2*R^T*inv(TLB*TLB2) or something like that.
Hope someone can help me here, thanks.
3 件のコメント
David Goodmanson
2020 年 5 月 26 日
Hi Simon,
if you want a result in symbolic variables you are not going to do significantly better than what you have. If you are looking for straight numerical results then you can get epressions that shorter than the result above.
Simon Detmer
2020 年 5 月 26 日
David Goodmanson
2020 年 5 月 27 日
With fifteen independent variables sprinkled around by matrix multiplication, you can't expect the results to be sleek. And if you do have a better looking alternative expression such as the one you suggest (assuming it were true) then of course the end result has to be exactly the same as the one you have. So a better starting point doesn't help.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!