diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1332/CH15/EX15.23/15_23.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1332/CH15/EX15.23/15_23.sce')
-rwxr-xr-x | 1332/CH15/EX15.23/15_23.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/1332/CH15/EX15.23/15_23.sce b/1332/CH15/EX15.23/15_23.sce new file mode 100755 index 000000000..3d3ed7f61 --- /dev/null +++ b/1332/CH15/EX15.23/15_23.sce @@ -0,0 +1,18 @@ +//Example 15.23
+//Milne Simpson Predictor Corrector Method
+//Page no. 544
+clc;clear;close;
+deff('y=f(x,y)','y=y+exp(x)')
+h=0.5;
+y=[1,1.824,3.718,7.722]
+for i=1:4
+ x=(i-1)*h;
+ f1(i)=f(x,y(i));
+ printf('\nf%i = %g',i-1,f1(i))
+end
+y41=y(1)+4*h*(2*f1(4)-f1(3)+2*f1(2))/3
+f4=f(x+h,y41);
+y4=y(3)+h*(f4+4*f1(4)+f1(3))/3
+printf('\n\n\nPredictor = %.9f\n\n',y41)
+printf('Evaluator = %.9f\n\n',f4)
+printf('Corrector = %.9f',y4)
\ No newline at end of file |