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/CH1/EX1.9/Ex1_9.sce | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 3293/CH1/EX1.9/Ex1_9.sce (limited to '3293/CH1/EX1.9/Ex1_9.sce') diff --git a/3293/CH1/EX1.9/Ex1_9.sce b/3293/CH1/EX1.9/Ex1_9.sce new file mode 100755 index 000000000..6e1fd0984 --- /dev/null +++ b/3293/CH1/EX1.9/Ex1_9.sce @@ -0,0 +1,27 @@ +//page 14 +//Example 1.9 +clear; +close; +clc; +A = [1 -2 1;2 1 1;0 5 -1]; +disp(A,'A = '); +disp('Applying row transformations:'); +disp('R2 = R2 - 2*R1'); +A(2,:) = A(2,:) - 2*A(1,:); +disp(A,'A = '); +disp('R3 = R3 - R2'); +A(3,:) = A(3,:) - A(2,:); +disp(A,'A = '); +disp('R2 = 1/5*R2'); +A(2,:) = 1/5*A(2,:); +disp(A,'A = '); +disp('R1 = R1 - 2*R2'); +A(1,:) = A(1,:) + 2*A(2,:); +disp(A,'A = '); +disp('The condition that the system have a solution is:'); +disp('2*y1 - y2 + y3 = 0'); +disp('where, y1,y2,y3 are some scalars'); +disp('If the condition is satisfied then solutions are obtained by assigning a value c to x3'); +disp('Solutions are:'); +disp('x2 = 1/5*c + 1/5*(y2 - 2*y1)','x1 = -3/5*c + 1/5*(y1 + 2*y2)'); +//end -- cgit