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.39 | |
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.39')
-rwxr-xr-x | 50/CH4/EX4.39/ex_4_39.sce | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/50/CH4/EX4.39/ex_4_39.sce b/50/CH4/EX4.39/ex_4_39.sce new file mode 100755 index 000000000..3b231135d --- /dev/null +++ b/50/CH4/EX4.39/ex_4_39.sce @@ -0,0 +1,34 @@ +// example 4.39
+// gram schmidt orthogonalisation
+
+// 1)
+ W=1;
+ x=poly(0,"x");
+ P0=1
+ phi0=P0;
+ a10=0;
+ P1=x-a10*phi0
+ phi1=P1;
+
+ a20=integrate('x^2','x',-1,1)/integrate('W*1*phi0','x',-1,1);
+
+ a21=integrate('(x^3)','x',-1,1)/integrate('(x)^2','x',-1,1);
+
+ P2=x^2-a20*x-a21*phi1
+
+
+// 2)
+disp(' W=1/(1-x^2)^(1/2)');
+ x=poly(0,"x");
+ P0=1
+ phi0=P0;
+ a10=0;
+ P1=x-a10*phi0
+ phi1=P1;
+
+ a20=integrate('x^2/(1-x^2)^(1/2)','x',-1,1)/integrate('1/(1-x^2)^(1/2)','x',-1,1);
+
+ a21=0; // since x^3 is an odd function;
+
+ P2=x^2-a20*x-a21*phi1
+
|