summaryrefslogtreecommitdiff
path: root/50/DEPENDENCIES/multipoint_iteration33.sce
blob: bd4bc3308f202e34e3fa9e76684e5b8655ca6b25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function x=multipoint_iteration33(x,f,fp,R)
    R=3;
    PE=10^-5;
    maxval=10^4;
    for n=1:1:R
        x=x-f(x)/fp(x)-f(x-(f(x)/fp(x)))/fp(x); 
        if abs(f(x))<=PE then break;
        end
        if (abs(f(x))>maxval) then error('Solution diverges');
            break
        end
     end   
    disp(n," no. of iterations =")
endfunction