diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /413/CH6/EX6.7/Example_6_3.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '413/CH6/EX6.7/Example_6_3.sce')
-rw-r--r-- | 413/CH6/EX6.7/Example_6_3.sce | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/413/CH6/EX6.7/Example_6_3.sce b/413/CH6/EX6.7/Example_6_3.sce new file mode 100644 index 000000000..26169b05d --- /dev/null +++ b/413/CH6/EX6.7/Example_6_3.sce @@ -0,0 +1,31 @@ +// Solving Using Shooting Method
+// u''-(1-x/5)uu'=x, u(1)=2, u(3)=-1)
+function ydot=f(t, y),
+ ydot=[y(2);
+ t+y(1)*y(2)*(1-t/5);]
+endfunction
+y0=[2,-1.5]';t0=1;t=1:0.2:3;
+y=ode(['rkf'],y0,t0,t,f)
+
+y1=[2,-3]'
+U=ode(['rkf'],y1,t0,t,f)
+y2=[2,-2.2137]'
+V=ode(['rkf'],y2,t0,t,f)
+y11=[2,-1.9460]'
+U1=ode(['rkf'],y11,t0,t,f)
+y21=[2,-2.0215]'
+V1=ode(['rkf'],y21,t0,t,f)
+y111=[2,-2.0162]'
+U11=ode(['rkf'],y111,t0,t,f)
+y211=[2,-2.0161]'
+V11=ode(['rkf'],y211,t0,t,f)
+printf('Table 6.16')
+printf('\n Assume values for du/dx(1) Calculated Values of u(3)')
+T=[y0(2,1) y(1,11);
+ y1(2,1) U(1,11);
+ y2(2,1) V(1,11);
+ y11(2,1) U1(1,11);
+ y21(2,1) V1(1,11);
+ y111(2,1) U11(1,11);
+ y211(2,1) V11(1,11);]
+disp(T)
|