How to find all double expressions added to a very long formula?

1 view (last 30 days)
Hamza Yusuf
Hamza Yusuf on 12 Nov 2020
Given a large formula how do i find all expressions multiplied by two terms such as.
syms m1 m2 l1 l2 thetadotdot1 thetadotdot2 thetadot1 thetadot2 theta1 theta2 g; n=1;
The output should be
Where the coeficient is
Currently I am using this method:
feval(symengine, 'coeff', t1, thetadot1,n)/thetadot2;
But I want a better bethod that this, as this might not work for all cases.

Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by