summaryrefslogtreecommitdiff
path: root/50/CH4/EX4.23/ex_4_23.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /50/CH4/EX4.23/ex_4_23.sce
downloadScilab-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-x50/CH4/EX4.23/ex_4_23.sce26
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