Hey im trying to find the secant method.
I am trying to modify my newton's code, but am not getting anywhere.
Here is the code I am using for newton's.
>> format long
>> f=@(x) ((x)^4-c);
>> fder=@(x) (4*(x)^3);
>> while n<100
The secant formula is xn+1=xn-(xn-xn-1)*f(xn)/f(xn)-f(xn-1).
Thus I need two points. Can someone please write out a nice matlab code that I can use (with say two points being 1.5, and 1.3)?