Docsity

Lab 5 answer template, Lab Reports of Engineering

Toggle sidebar
bg1
ENGR 231 – Linear Engineering Systems
Answer Template for Lab 5: Fall 2023
1
Your Name: ___Colin______________ ____McKee__________________ Section: 61
first last
Lab 5: The Inverse Matrix and Applications
As a convenience, this answer template is provided if you wish to easily submit your work.
Be sure to save it as a PDF before submitting online!
Question 1: Complete the table for the eight magic squares.
Seed Matrix
Magic Square #1
Magic Square #2
[∗ 1 ∗
∗ 5 ∗
∗∗∗]
[𝑥
19−2𝑥
𝑥−4 1
5
914−𝑥
2𝑥−9
10−𝑥]
[𝑥1
14−𝑥19−2𝑥
5
2𝑥−9 𝑥−4
9
10−𝑥]
[∗ 3 ∗
∗ 5 ∗
∗∗∗]
[𝑥
17−2𝑥
𝑥−2 3
5
712−𝑥
2𝑥−7
10−𝑥]
[𝑥3
12−𝑥17−2𝑥
5
2𝑥−7 𝑥−2
7
10−𝑥]
[∗ 7 ∗
∗ 5 ∗
∗∗∗]
[𝑥
13−2𝑥
𝑥+2 7
5
38−𝑥
2𝑥−3
10−𝑥]
[𝑥7
8−𝑥13−2𝑥
5
2𝑥−3 𝑥+2
3
10−𝑥]
[∗ 9 ∗
∗ 5 ∗
∗∗∗]
[𝑥
11−2𝑥
𝑥+4 9
5
16−𝑥
2𝑥−1
10−𝑥]
[𝑥9
6−𝑥11−2𝑥
5
2𝑥−1 𝑥+4
1
10−𝑥]
Question 2: Calculate the sum S of all the elements in M3 using the formula 𝑆=𝐫𝑇𝑀3 𝐫
S = _ _45
pf3
pf4
pf5

Partial preview of the text

Download Lab 5 answer template and more Lab Reports Engineering in PDF only on Docsity!

Answer Template for Lab 5 : Fall 2023 Your Name: ___Colin______________ ____McKee__________________ Section : 61 first last Lab 5 : The Inverse Matrix and Applications As a convenience, this answer template is provided if you wish to easily submit your work. Be sure to save it as a PDF before submitting online! Question 1: Complete the table for the eight magic squares. Seed Matrix Magic Square #1 Magic Square # [

]

[

] [

]

[

]

[

] [

]

[

]

[

] [

]

[

]

[

] [

]

Question 2 : Calculate the sum S of all the elements in M3 using the formula 𝑆 = 𝐫⃗ 𝑇𝑀 3 𝐫⃗ S = _ _ 45

Answer Template for Lab 5 : Fall 2023 Question 3: For each matrix in the table, record its determinant, adjoint and inverse using the commands det(), sym() and adjoint(). DO NOT use MATLAB's inv() command. Express all coefficients as rational numbers. No decimals allowed!! Code for the first matrix is given for you. In the last column, leave the determinant outside the matrix so all elements are integers. Matrix A Determinant of A Adjoint of A (always exists) Inverse of A Write DOES NOT EXIST if det(A) = 0. A = sym(magic(3)) Magic Matrix

[

] −

∙ [

]

A = sym(pascal(4)) Pascal Matrix 1

A = mod(pascal(4), 2) A = sym(A) Pascal Matrix Mod 2

A = sym(vander(1:4)) Vandermonde Matrix

A = [

]

[

]

D.N.E

Answer Template for Lab 5 : Fall 2023 Question 8: Put these all together and write 𝐴−^1 in terms of its smaller blocks and their inverses. Answer : 𝐴−^1 = [

𝐴 11 −^1 −𝐴 11 −^1 ∗ 𝐴 12 ∗ 𝐴 22 −^1

0 𝐴 22 −^1

]

Grader: One point for each of the two lines. Ready to Submit? Be sure all ten questions are answered. When your lab is complete, be sure to submit three files:

  1. Your completed Answer Template as a PDF file
  2. A copy of your MATLAB Live Script
  3. A PDF copy of your MATLAB Live Script (Save-Export to PDF…) Question 6 : The adjoint of A is: adjoint(𝐴) = [

1 2 3 4 5 ]

Questions 9-10: Cryptographic Example: Decode the secret message and paste in what it says! You should be able to just copy and paste the matrix. Then decode it using 𝐴−^1 and print it nicely using fprintf(). The secret message says: Line 1: Deep in the human unconscious is a pervasive need for a logical universe that makes sense. Line 2: But the real universe is always one step beyond logic. - Frank Herbert, Dune Question 7: Write out the solution. Hint: Every element is an integer. The unique solution is: 𝐱⃗⃗ = 𝐴−^1 𝐛⃗ = [ 𝟏 𝟐 𝟑 𝟒 𝟓] A few of the components are given so you can check your work.

Answer Template for Lab 5 : Fall 2023 The due date is the day after your lab section by 11:59pm to receive full credit. You have one more day, to submit the lab (but with a small penalty), and then the window closes for good and your grade will be zero.