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 /1332/CH12/EX12.2 | |
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 '1332/CH12/EX12.2')
-rwxr-xr-x | 1332/CH12/EX12.2/12_2.pdf | bin | 0 -> 6048 bytes | |||
-rwxr-xr-x | 1332/CH12/EX12.2/12_2.sce | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/1332/CH12/EX12.2/12_2.pdf b/1332/CH12/EX12.2/12_2.pdf Binary files differnew file mode 100755 index 000000000..f4b941b25 --- /dev/null +++ b/1332/CH12/EX12.2/12_2.pdf diff --git a/1332/CH12/EX12.2/12_2.sce b/1332/CH12/EX12.2/12_2.sce new file mode 100755 index 000000000..0f30446c9 --- /dev/null +++ b/1332/CH12/EX12.2/12_2.sce @@ -0,0 +1,20 @@ +//Example 12.2
+//Lagarangian Method
+//Page no. 373
+clc;close;clear;
+
+xk=[-1,0,2,5];
+yk=[10,7,7,22];
+
+P=0;
+x=poly(0,"x");
+for k=0:3
+ p=yk(k+1)
+ for j=0:3
+ if(j~=k)
+ p=p*((x-xk(j+1))/(xk(k+1)-xk(j+1)))
+ end
+ end
+ P=P+p;
+end
+disp(P,'P=')
\ No newline at end of file |