differentiate function

Apr 2010
23
0
Code:
function func(f)

fx=inline(f);

fdx = diff(fx);

end
Iam getting an error

??? Error using ==> diff
Function 'diff' is not supported for class 'inline'.

Error in ==> newton at 5
fdx = diff(fx);

How can i resolve this issue

Please help ( iam using MATLAB)
 

CaptainBlack

MHF Hall of Fame
Nov 2005
14,972
5,271
someplace
Code:
function func(f)

fx=inline(f);

fdx = diff(fx);

end
Iam getting an error

??? Error using ==> diff
Function 'diff' is not supported for class 'inline'.

Error in ==> newton at 5
fdx = diff(fx);

How can i resolve this issue

Please help ( iam using MATLAB)
inline defines a numeric function diff requires a symbolic function

CB