MATLAB: How to calculate detivative of a function with respect to another function

cosinederivativesymbolicSymbolic Math Toolbox

Hi! I want to calculate the derivative below in matlab
Have anyone any idea?

Best Answer

  • syms u x
    subs(diff(u^2 - 1), u, cos(x))