8 lines
151 B
Matlab
8 lines
151 B
Matlab
clear,clc
|
|
f = @(x) x.^2 + 3*x - 1 + 5*x.*sin(x);
|
|
pkg load symbolic
|
|
syms x;
|
|
ff = f(x);
|
|
% now calculate the derivative of the function
|
|
ffd = diff(ff, x)
|