diff options
Diffstat (limited to '26/CH1/EX1.1.13/1_1_13.sce')
-rwxr-xr-x | 26/CH1/EX1.1.13/1_1_13.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/26/CH1/EX1.1.13/1_1_13.sce b/26/CH1/EX1.1.13/1_1_13.sce new file mode 100755 index 000000000..90c529311 --- /dev/null +++ b/26/CH1/EX1.1.13/1_1_13.sce @@ -0,0 +1,22 @@ +disp('the augmented matrix is')
+a=[1 0 -3 8;2 2 9 7;0 1 5 -2]
+disp(a)
+disp('R2=R2-2*R1')
+a(2,:)=a(2,:)-2*a(1,:)
+disp(a)
+disp('interchange R2 and R3')
+a([2,3],:)=a([3,2],:)
+disp(a)
+disp('R3=R3-2*R2')
+a(3,:)=a(3,:)-2*a(2,:)
+disp(a)
+disp('R3=(1/5)*R3')
+a(3,:)=(1/5)*a(3,:)
+disp(a)
+disp('R2=R2-5*R3 and R1=R1+3*R3')
+a(2,:)=a(2,:)-5*a(3,:)
+a(1,:)=a(1,:)+3*a(3,:)
+disp(a)
+s=[a(1,4);a(2,4);a(3,4)]
+disp('solution is')
+disp(s)
\ No newline at end of file |