diff options
Diffstat (limited to '26/CH6/EX6.4.1/6_4_1.sce')
-rwxr-xr-x | 26/CH6/EX6.4.1/6_4_1.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/26/CH6/EX6.4.1/6_4_1.sce b/26/CH6/EX6.4.1/6_4_1.sce new file mode 100755 index 000000000..beeb5b0e0 --- /dev/null +++ b/26/CH6/EX6.4.1/6_4_1.sce @@ -0,0 +1,15 @@ +disp('to orthogonalise the given vectors using Gram-Schimdt orthogonalisation')
+x1=[3;0;-1]
+x2=[8;5;-6]
+disp(x2,'x2=',x1,'x1=')
+disp('Let v1=x1')
+v1=x1
+disp('v2=x2-((x2.v1)/(v1.v1))*v1')
+a1=x2'*v1
+a2=v1'*v1
+p=(a1/a2)*v1
+v2=x2-p
+disp(p,'-',x2,'=')
+disp(v2,'=')
+disp('Thus, an orthogonal basis is:')
+disp(v2,v1)
\ No newline at end of file |