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 /50/CH4/EX4.23/ex_4_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 '50/CH4/EX4.23/ex_4_23.sce')
-rwxr-xr-x | 50/CH4/EX4.23/ex_4_23.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/50/CH4/EX4.23/ex_4_23.sce b/50/CH4/EX4.23/ex_4_23.sce new file mode 100755 index 000000000..e06601bef --- /dev/null +++ b/50/CH4/EX4.23/ex_4_23.sce @@ -0,0 +1,26 @@ +// example: 4.23;
+// piecewise cubical interpolating polinomials:
+
+X=[-3 -2 -1 1 3 6 7];
+F=[369 222 171 165 207 990 1779];
+// we need to apply legranges interpolation in sub-ranges [-3 ,1];[1,7];
+
+
+ x=poly(0,"x");
+
+ // 1) in the range [-3,1]
+ x=[-3 -2 -1 1];
+ f=[369 222 171 165];
+ n=3;
+P2=lagrangefundamentalpoly(x,f,n);
+
+ // 2) in the range [1,7]
+ x=[1 3 6 7];
+ f=[165 207 990 1779];
+n=3;
+P2=lagrangefundamentalpoly(x,f,n)
+
+
+
+ // hence,
+ disp('f(6.5)=1339.25');
\ No newline at end of file |