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/CH3/EX3.2/Example_3_2.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/CH3/EX3.2/Example_3_2.sce')
-rw-r--r-- | 413/CH3/EX3.2/Example_3_2.sce | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/413/CH3/EX3.2/Example_3_2.sce b/413/CH3/EX3.2/Example_3_2.sce new file mode 100644 index 000000000..b28cfce2d --- /dev/null +++ b/413/CH3/EX3.2/Example_3_2.sce @@ -0,0 +1,29 @@ +clc
+clear
+x=[32 22.2 41.6 10.1 50.5]
+y=[0.52992 0.37784 0.66393 0.17537 0.63608]
+for i=1:1:5
+X=[x(1,i) y(1,i)]
+disp(X)
+end
+a=27.5
+for i=1:4
+ A(1,i)=((a-x(1,i))*y(1,i+1)+(x(1,i+1)-a)*y(1,i))/(x(1,i+1)-x(1,i))
+end
+for i=1:3
+ B(1,i)=((a-x(1,i))*A(1,i+1)+(x(1,i+2)-a)*A(1,i))/(x(1,i+2)-x(1,i))
+end
+for i=1:2
+ C(1,i)=((a-x(1,i))*B(1,i+1)+(x(1,i+3)-a)*B(1,i))/(x(1,i+3)-x(1,i))
+end
+D(1,1)=((a-x(1,1))*C(1,2)+(x(1,5)-a)*C(1,1))/(x(1,5)-x(1,1))
+out=[0,x(1,1),y(1,1) ]
+disp(out)
+out1=[1,x(1,2),y(1,2), A(1,1) ]
+disp(out1)
+out2=[2,x(1,3),y(1,3), A(1,2), B(1,1),C(1,1),D(1,1) ]
+disp(out2)
+out3=[3,x(1,4),y(1,4), A(1,3), B(1,2),C(1,2) ]
+disp(out3)
+out4=[4,x(1,5),y(1,5), A(1,4), B(1,3) ]
+disp(out4)
\ No newline at end of file |