aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--math2373/lab2.txt420
1 files changed, 420 insertions, 0 deletions
diff --git a/math2373/lab2.txt b/math2373/lab2.txt
new file mode 100644
index 0000000..34ccda8
--- /dev/null
+++ b/math2373/lab2.txt
@@ -0,0 +1,420 @@
+format rational
+A=[2 -1 4 -5 19; -1 3 -2 -1 -18; 0 1 5 -6 12; 3 -8 1 0 29]
+
+A =
+
+ 2 -1 4 -5 19
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A=Aog
+{Undefined function or variable 'Aog'.
+}
+Aog=A
+
+Aog =
+
+ 2 -1 4 -5 19
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(1,:)=A(1,:)+A(2,:)
+
+A =
+
+ 1 2 2 -6 1
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(2,:)=A(1,:)+A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 2 4 4 -12 2
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(2,:)=A(1,:)-A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 0 0 0 0
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(2,:)=A(1,:)-A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 0 0 0 0
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A=Aog
+
+A =
+
+ 2 -1 4 -5 19
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(1,:)=A(1,:)+A(2,:)
+
+A =
+
+ 1 2 2 -6 1
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(2,:)=A(2,:)+A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 5 0 -7 -17
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(4,:)=A(4,:)-3*A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 5 0 -7 -17
+ 0 1 5 -6 12
+ 0 -14 -5 18 26
+
+A(2,:)=A(2,:)-4*A(3,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 1 -20 17 -65
+ 0 1 5 -6 12
+ 0 -14 -5 18 26
+
+A(3,:)=A(2,:)-A(3,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 1 -20 17 -65
+ 0 0 -25 23 -77
+ 0 -14 -5 18 26
+
+A(4,:)=A(2,:)1*4*A(2,:)
+ A(4,:)=A(2,:)1*4*A(2,:)
+ ↑
+{Error: Invalid expression. Check for missing multiplication operator, missing or
+unbalanced delimiters, or other syntax error. To construct matrices, use brackets
+instead of parentheses.
+}
+A(4,:)=A(2,:)+14*A(2,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 1 -20 17 -65
+ 0 0 -25 23 -77
+ 0 15 -300 255 -975
+
+A(4,:)=A(2,:)-14*A(2,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 1 -20 17 -65
+ 0 0 -25 23 -77
+ 0 -13 260 -221 845
+
+A =
+ A =
+ ↑
+{Error: Invalid expression. Check for missing or extra characters.
+}
+A = Aog
+
+A =
+
+ 2 -1 4 -5 19
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(1,:)=A(1,:)+A(2,:)
+
+A =
+
+ 1 2 2 -6 1
+ -1 3 -2 -1 -18
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(2,:)=A(2,:)+A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 5 0 -7 -17
+ 0 1 5 -6 12
+ 3 -8 1 0 29
+
+A(4,:)=A(4,:)-3*A(1,:)
+
+A =
+
+ 1 2 2 -6 1
+ 0 5 0 -7 -17
+ 0 1 5 -6 12
+ 0 -14 -5 18 26
+
+Aog2=a
+{Undefined function or variable 'a'.
+}
+Aog2=A
+
+Aog2 =
+
+ 1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