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.6/ex_4_6.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.6/ex_4_6.sce')
-rwxr-xr-x | 50/CH4/EX4.6/ex_4_6.sce | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/50/CH4/EX4.6/ex_4_6.sce b/50/CH4/EX4.6/ex_4_6.sce new file mode 100755 index 000000000..869b1f772 --- /dev/null +++ b/50/CH4/EX4.6/ex_4_6.sce @@ -0,0 +1,18 @@ +// example :4.6
+// caption : obtain the legrange linear interpolating polinomial
+
+
+// 1) obtain the legrange linear interpolating polinomial in the interval [1,3] and obtain approximate value of f(1.5),f(2.5);
+x0=1;x1=2;x2=3;f0=.8415;f1=.9093;f2=.1411;
+
+P13=legrangeinterpol (x0,x2,f0,f2) //in the range [1 ,3]
+
+
+P12=legrangeinterpol (x0,x1,f0,f1) // in the range [1,2]
+
+P23=legrangeinterpol (x1,x2,f1,f2) // inthe range [2,3]
+
+// from P23 we find that ; where as exact value is sin(2.5)=0.5985;
+disp('P(1.5)=0.8754');
+disp('exact value of sin(1.5)=.9975')
+disp('P(2.5)=0.5252');
\ No newline at end of file |