MATLAB: Calculating derivative of a function

derivative function

a=62;
b=95;
y = @(x) (3*x.^2.*sin(a*x))./(x.^2+b);
dy = diff(y)
I don't know exactly how i need to calculate the derivative correctly.

Best Answer

syms x
a=62;
b=95;
y = (3*x.^2.*sin(a*x))./(x.^2+b);
dy = diff(y)