I find out the answer but now I have another question , how do I use inserted value for the derivative of func??
error:
Error using feval
Function to evaluate must be represented as a string scalar, character vector, or function_handle object.
Error in Untitled (line 9)
n=feval(df,2)
----------------------------------------------------
clc
clear
str = input('Give an equation in x: ','s') ;
x = input('Type in a value of x: ') ;
f = inline(str,'x') ;
y = feval(f,x) ;
syms x
df = diff(f(x),x)
n=feval(df,2)