summaryrefslogtreecommitdiff
path: root/50/DEPENDENCIES/multipoint_iteration33.sce
diff options
context:
space:
mode:
Diffstat (limited to '50/DEPENDENCIES/multipoint_iteration33.sce')
-rwxr-xr-x50/DEPENDENCIES/multipoint_iteration33.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/50/DEPENDENCIES/multipoint_iteration33.sce b/50/DEPENDENCIES/multipoint_iteration33.sce
new file mode 100755
index 000000000..bd4bc3308
--- /dev/null
+++ b/50/DEPENDENCIES/multipoint_iteration33.sce
@@ -0,0 +1,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 \ No newline at end of file