aboutsummaryrefslogtreecommitdiffstats
path: root/math2373
diff options
context:
space:
mode:
Diffstat (limited to 'math2373')
-rw-r--r--math2373/lab2.txt664
1 files changed, 664 insertions, 0 deletions
diff --git a/math2373/lab2.txt b/math2373/lab2.txt
index ed40ff4..dbd27c5 100644
--- a/math2373/lab2.txt
+++ b/math2373/lab2.txt
@@ -416,3 +416,667 @@ ans =
0 0 0 1 1
diary off
+format rational
+A=[-2 1 9 1; 3 3 -4 2; 1 4 5 5]
+
+A =
+
+ Columns 1 through 3
+
+ -2 1 9
+ 3 3 -4
+ 1 4 5
+
+ Column 4
+
+ 1
+ 2
+ 5
+
+Asave=A
+
+Asave =
+
+ Columns 1 through 3
+
+ -2 1 9
+ 3 3 -4
+ 1 4 5
+
+ Column 4
+
+ 1
+ 2
+ 5
+
+a=A
+
+a =
+
+ Columns 1 through 3
+
+ -2 1 9
+ 3 3 -4
+ 1 4 5
+
+ Column 4
+
+ 1
+ 2
+ 5
+
+a([1 3],:)=a([3 1],:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 3 3 -4
+ -2 1 9
+
+ Column 4
+
+ 5
+ 2
+ 1
+
+a(2,:)=a(2,:)-3+a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 1 4 -2
+ -2 1 9
+
+ Column 4
+
+ 5
+ 4
+ 1
+
+a(2,:)=a(2,:)+3-a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 3 3 -4
+ -2 1 9
+
+ Column 4
+
+ 5
+ 2
+ 1
+
+a(2,:)=a(2,:)-3*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 0 -9 -19
+ -2 1 9
+
+ Column 4
+
+ 5
+ -13
+ 1
+
+a(3,:)=a(3,:)+2*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 0 -9 -19
+ 0 9 19
+
+ Column 4
+
+ 5
+ -13
+ 11
+
+a(2,:)=a(2,:)/-9
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 0 1 19/9
+ 0 9 19
+
+ Column 4
+
+ 5
+ 13/9
+ 11
+
+a(3,:)=a(3,:)-9*a(2,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 0 1 19/9
+ 0 0 0
+
+ Column 4
+
+ 5
+ 13/9
+ -2
+
+ref2=a
+
+ref2 =
+
+ Columns 1 through 3
+
+ 1 4 5
+ 0 1 19/9
+ 0 0 0
+
+ Column 4
+
+ 5
+ 13/9
+ -2
+
+a=[2 3 -4 1 2; 3 -1 -1 2 4; 1 -7 5 -1 6]
+
+a =
+
+ Columns 1 through 3
+
+ 2 3 -4
+ 3 -1 -1
+ 1 -7 5
+
+ Columns 4 through 5
+
+ 1 2
+ 2 4
+ -1 6
+
+a([1 3],:)=a([3 1],:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 3 -1 -1
+ 2 3 -4
+
+ Columns 4 through 5
+
+ -1 6
+ 2 4
+ 1 2
+
+a(2,:)=a(2,:)-3*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 20 -16
+ 2 3 -4
+
+ Columns 4 through 5
+
+ -1 6
+ 5 -14
+ 1 2
+
+a(3,:)=a(3,:)-2*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 20 -16
+ 0 17 -14
+
+ Columns 4 through 5
+
+ -1 6
+ 5 -14
+ 3 -10
+
+a(2,:)=a(2,:)/20
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 1 -4/5
+ 0 17 -14
+
+ Columns 4 through 5
+
+ -1 6
+ 1/4 -7/10
+ 3 -10
+
+a(3,:)=a(3,:)-17*a(2,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 1 -4/5
+ 0 0 -2/5
+
+ Columns 4 through 5
+
+ -1 6
+ 1/4 -7/10
+ -5/4 19/10
+
+a(3,:)=a(3,:)*(-5/2)
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 1 -4/5
+ 0 0 1
+
+ Columns 4 through 5
+
+ -1 6
+ 1/4 -7/10
+ 25/8 -19/4
+
+A=[2 3 -4 1 2; 3 -1 -1 2 4; 1 -7 5 -1 6]
+
+A =
+
+ Columns 1 through 3
+
+ 2 3 -4
+ 3 -1 -1
+ 1 -7 5
+
+ Columns 4 through 5
+
+ 1 2
+ 2 4
+ -1 6
+
+rref(A)
+
+ans =
+
+ Columns 1 through 3
+
+ 1 0 0
+ 0 1 0
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 11/4 -9/2
+ 25/8 -19/4
+
+a
+
+a =
+
+ Columns 1 through 3
+
+ 1 -7 5
+ 0 1 -4/5
+ 0 0 1
+
+ Columns 4 through 5
+
+ -1 6
+ 1/4 -7/10
+ 25/8 -19/4
+
+a(1,:)=a(1,:)+7*a(2,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 -3/5
+ 0 1 -4/5
+ 0 0 1
+
+ Columns 4 through 5
+
+ 3/4 11/10
+ 1/4 -7/10
+ 25/8 -19/4
+
+a(1,:)=a(1,:)+(3/5)*a(3,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 *
+ 0 1 -4/5
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 1/4 -7/10
+ 25/8 -19/4
+
+a(2,:)=a(2,:)+(4/5)*a(3,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 *
+ 0 1 *
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 11/4 -9/2
+ 25/8 -19/4
+
+rref(A)
+
+ans =
+
+ Columns 1 through 3
+
+ 1 0 0
+ 0 1 0
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 11/4 -9/2
+ 25/8 -19/4
+
+rref3=a
+
+rref3 =
+
+ Columns 1 through 3
+
+ 1 0 *
+ 0 1 *
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 11/4 -9/2
+ 25/8 -19/4
+
+rref3a=a
+
+rref3a =
+
+ Columns 1 through 3
+
+ 1 0 *
+ 0 1 *
+ 0 0 1
+
+ Columns 4 through 5
+
+ 21/8 -7/4
+ 11/4 -9/2
+ 25/8 -19/4
+
+delete rref3
+[Warning: File 'rref3' not found.]
+remove rref3
+{Undefined function 'remove' for input arguments of
+type 'char'.
+}
+a=[2 3 -4 4; 8 11 -7 8; 2 2 -4 -3]
+
+a =
+
+ Columns 1 through 3
+
+ 2 3 -4
+ 8 11 -7
+ 2 2 -4
+
+ Column 4
+
+ 4
+ 8
+ -3
+
+A=a
+
+A =
+
+ Columns 1 through 3
+
+ 2 3 -4
+ 8 11 -7
+ 2 2 -4
+
+ Column 4
+
+ 4
+ 8
+ -3
+
+rref(A)
+
+ans =
+
+ Columns 1 through 3
+
+ 1 0 0
+ 0 1 0
+ 0 0 1
+
+ Column 4
+
+ -157/18
+ 7
+ -1/9
+
+a
+
+a =
+
+ Columns 1 through 3
+
+ 2 3 -4
+ 8 11 -7
+ 2 2 -4
+
+ Column 4
+
+ 4
+ 8
+ -3
+
+a(1,:)=a(1,:)/2
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 8 11 -7
+ 2 2 -4
+
+ Column 4
+
+ 2
+ 8
+ -3
+
+a(2,:)=a(2,:)-8*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 0 -1 9
+ 2 2 -4
+
+ Column 4
+
+ 2
+ -8
+ -3
+
+a(3,:)=a(3,:)-2*a(1,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 0 -1 9
+ 0 -1 0
+
+ Column 4
+
+ 2
+ -8
+ -7
+
+a(2,:)=a(2,:)/-1
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 0 1 -9
+ 0 -1 0
+
+ Column 4
+
+ 2
+ 8
+ -7
+
+a(3,:)=a(3,:)+1*a(2,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 0 1 -9
+ 0 0 -9
+
+ Column 4
+
+ 2
+ 8
+ 1
+
+a(3,:)=a(3,:)/-9
+
+a =
+
+ Columns 1 through 3
+
+ 1 3/2 -2
+ 0 1 -9
+ 0 0 1
+
+ Column 4
+
+ 2
+ 8
+ -1/9
+
+a(1,:)=a(1,:)-(3/2)*a(2,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 23/2
+ 0 1 -9
+ 0 0 1
+
+ Column 4
+
+ -10
+ 8
+ -1/9
+
+a(2,:)=a(2,:)+9*a(3,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 23/2
+ 0 1 0
+ 0 0 1
+
+ Column 4
+
+ -10
+ 7
+ -1/9
+
+a(1,:)=a(1,:)-(23/2)*a(3,:)
+
+a =
+
+ Columns 1 through 3
+
+ 1 0 0
+ 0 1 0
+ 0 0 1
+
+ Column 4
+
+ -157/18
+ 7
+ -1/9
+
+rref3b=a
+
+rref3b =
+
+ Columns 1 through 3
+
+ 1 0 0
+ 0 1 0
+ 0 0 1
+
+ Column 4
+
+ -157/18
+ 7
+ -1/9
+
+diary off