How to extract a coefficient from a specific symbolic variable?

q_doubledot5*(Iy5*cos((pi*q4)/180)^2 + Iy6*cos((pi*q4)/180)^2 + Ix5*sin((pi*q4)/180)^2 + Ix6*sin((pi*q4)/180)^2) - qdot5*((Ix6*qdot6*pi*cos((pi*q5)/180)*sin((pi*q4)/180))/180 - (Iy6*qdot6*pi*cos((pi*q4)/180)*sin((pi*q5)/180))/180) + (Iy6*qdot6*pi*sin((pi*q5)/180)*(qdot2*cos((pi*q1)/180) - qdot5*cos((pi*q4)/180) + qdot6*cos((pi*q5)/180)))/360 + (Iy6*qdot6*pi*sin((pi*q5)/180)*((qdot2*cos((pi*q1)/180))/2 - (qdot5*cos((pi*q4)/180))/2 + (qdot6*cos((pi*q5)/180))/2))/180 - (Ix6*qdot6*pi*cos((pi*q5)/180)*(qdot2*sin((pi*q1)/180) - qdot5*sin((pi*q4)/180) + qdot6*sin((pi*q5)/180)))/360 - (Ix6*qdot6*pi*cos((pi*q5)/180)*((qdot2*sin((pi*q1)/180))/2 - (qdot5*sin((pi*q4)/180))/2 + (qdot6*sin((pi*q5)/180))/2))/180
What should i do to extract only the coefficient of qdoubledot5 term only.
ps i tried to use coeffs() and it does not work.

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

質問済み:

2021 年 1 月 7 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by