I am trying to find the coefficients of sin(w*t), cos (w*t), sin(2*w*t) and cos(2*w*t) in the expression 'f'
Here is the code
clear allclose allclcsyms A11 A12 A21 A22 B1 B2syms A0 B0 A1 B1 C1 D1syms w tsyms Ps Pcsyms km th=A0*cos(w*t)+B0*sin(w*t)+B1*cos(2*w*t)+B1+C1*sin(2*w*t);thd=diff(th,t);thdd=diff(th,t,2);f=thdd-(A21-A22*(1+km*(sin(w*t)*Pc+cos(w*t)*Ps)))*thd-(A22*w*km*(cos(w*t)*Pc-sin(w*t)*Ps))*thd+B1*w*cos(w*t);
But I am finding it difficult to rearrage the expression, interms of sin(w*t), cos (w*t), sin(2*w*t) and cos(2*w*t)
[C,T] = coeffs(f,{sin(w*t),cos(w*t),cos(2*w*t),sin(2*w*t)})
Any help.
Thank You
Best Answer