I'm writing this function:
[x,n_iter,ERR] = newton_fun(f,df,x0,eps,max_iter)
How can I insert an input control that gives me an error if the input "f" is not inserted in the anonymous function form?
es:
>>[x,n_iter,ERR] = newton_fun(@(x)x^2,df,2,0.004,100)
Best Answer