I have a symbolic expression. I want to replace a sub-expression in this expression with another variable or expression. I am using SUBS but it does not make the substitution as expected. For example:
syms a b C L tu=a*cos(1/(C*L)^2*t+3)+b*sin(1/(C*L)^2*5*t+3);w0=1/(C*L)^2;p = subs(u, w0, 'w0')p =a*cos(t/(C^2*L^2) + 3) + b*sin((5*t)/(C^2*L^2) + 3)
Best Answer