MATLAB: Derivative of symbolic funtion at a specific value

differential equations

I have a symbolic function of variable "x"
Function = @(x) 8-4.5*(x-sin (x));
say I need to get the derivative at x=5
what should i do?

Best Answer

Function = @(x) 8-4.5*(x-sin (x));
Function(5)
%derivative
Function_d = @(x) diff('8-4.5*(x-sin (x))');
x=5; eval(Function_d(1))