I want user insert the function and the program get Derivative of it by using the given code but it wouldn't work
and show me this message :
Undefined function 'diff' for input arguments of type 'inline'.
Error in Untitled (line 8)
m=diff(f)
…………………….
my code :
clcclearstr = input('Give an equation in x: ','s') ;x = input('Type in a value of x: ') ; f = inline(str,'x') ;y = feval(f,x) ;m=diff(f)disp(['"' str '", for x = ' num2str(x) ', equals ' num2str(y)]) ;
Best Answer