From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 26/CH6/EX6.3.7/6_3_7.sce | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 26/CH6/EX6.3.7/6_3_7.sce (limited to '26/CH6/EX6.3.7/6_3_7.sce') diff --git a/26/CH6/EX6.3.7/6_3_7.sce b/26/CH6/EX6.3.7/6_3_7.sce new file mode 100755 index 000000000..a0d8ffeeb --- /dev/null +++ b/26/CH6/EX6.3.7/6_3_7.sce @@ -0,0 +1,17 @@ +disp('Vectors u1 u2 and y are') +u1=[1;3;-2] +u2=[5;1;4] +y=[1;3;5] +disp(y,'y=',u2,'u2=',u1,'u1=') +disp('u1.u2=') +a=u1'*u2 +disp(a,'=') +disp('Hence, {u1 u2} form an orthogonal basis.') +disp('Let W=span{u1 u2}') +disp('Therefore, projection of y on W is:') +disp('((y.u1)/(u1.u1))*u1+((y.u2)/(u2.u2))*u2') +a1=y'*u1 +a2=u1'*u1 +b1=y'*u2 +b2=u2'*u2 +disp((b1/b2)*u2,'+',(a1/a2)*u1,'=') \ No newline at end of file -- cgit