Find the numerical value of the derivative of a function at a point in MATLAB

In the MATLAB environment, you need to find the numerical value of the derivative of the function at a point.

x0 = -10;
syms x;
Func = 2*exp(-5-x)-2.5;
dv = diff(Func, 'x');
Devirative = subs(dv, x, x0);  

Returns a character value (-2*exp(5)), how to calculate it? do not prescribe the same manually.

 1
Author: user193688, 2016-09-08

1 answers

df = double(Devirative) or df = eval(Devirative)

 2
Author: AVK, 2016-09-16 04:55:15