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 --- 3293/CH8/EX8.9/Ex8_9.sce | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 3293/CH8/EX8.9/Ex8_9.sce (limited to '3293/CH8/EX8.9/Ex8_9.sce') diff --git a/3293/CH8/EX8.9/Ex8_9.sce b/3293/CH8/EX8.9/Ex8_9.sce new file mode 100755 index 000000000..b3f53a518 --- /dev/null +++ b/3293/CH8/EX8.9/Ex8_9.sce @@ -0,0 +1,34 @@ +//page 278 +//Example 8.9 +clc; +clear; +close; +a = round(rand(1,2) * 10); +x = a(1); +y = a(2); +b = [-y x]; +disp(a,'(x,y) = '); +disp(b,'(-y,x) = '); +disp('Inner product of these vectors is:'); +t = -x*y + y*x; +disp(t,'(x,y)|(-y,x) = '); +disp('So, these are orthogonal.'); +disp('------------------------------------------'); +disp('If inner product is defined as:'); +disp('(x1,x2)|(y1,y2) = x1y1- x2y1 - x1y2 + 4x2y2'); +disp('Then, (x,y)|(-y,x) = -x*y+y^2-x^2+4*x*y = 0 if,'); +disp('y = 1/2(-3 + sqrt(13))*x'); +disp('or'); +disp('y = 1/2(-3 - sqrt(13))*x'); +disp('Hence,'); +if y == 1/2*(-3 + sqrt(13))*x | y == 1/2*(-3 - sqrt(13))*x then +disp(a); +disp('is orthogonal to'); +disp(b); +else +disp(a); +disp('is not orthogonal to'); +disp(b); +end +//end + -- cgit