Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Check some linear algebra rules: Enter the following matrices: -6 4 -3 12 , B= 4-16 , C= The following rules of algebra hold
2. Check some linear algebra rules: Enter the following matrices: -6 4 -3 12 , B= 4-16 , C= The following rules of algebra hold for real numbers However, most of them are false for matrices. Use the matrices A, B,C above to perform the appropriate operations in MATLAB and determine which rules are false. Below. O denotes the 2 2 zero matrix. Note that if a rule holds for these particular matrices, t does not mean that it is true in general. However, you should be able to determine that from the theory you have leamed in class G) (AB)2 A B (ii) If A2-0, then A = O ii) If BC-0, then B-0 or C-0 (iv) (A B)(A+B) A (v) A(B + C) = BA + CA (vi) (A+B)2-A2 +2AB + B2 (vii) A(B + C)-AB + AC 6. Create a big matrix with submatrices: The following matrix G is created by inserting the matrices A. B, and C from Exercise 3, together with zero matrices and 2 2 identity IS CONTENT S PROTROTRD AND MAY NOT HE SHARED, UPLOADED, SOLD OR DISTRIHUTED matrices in the appropriate position. Create the matrix using submatrices A, B, C, zeros and eye (that is, you are not allowed to enter the numbers explicitly) 1-5 0001 0 5 3 0 000 1 1 06 0-24 0 0-50--2-5 7. Manipulate a matrix: Do the following operations on matrix G created above in Problem 6 (a) Extract the 3 3 submatrix of G consisting of columns 3 through 5 and rows 1 through 3 and store it in the matrix H, that is, create a matrix 6 0-2 by extracting the appropriate rows and columns from the matrix G (b) Create the matrix E obtained fromH by replacing H20 by 5. Do not enter E explicitly. Hin enter first E-H to create a copy of the matrix H and then manipulate the matrix E. The resing matrix should be E=1500 6 0-2 (c) Create the matrx F obtained by deleting the third column of the matrix H. Do not enter F explicitly (d) What happens if you type G(:,:) and hit retum? Do not include the output in your lab report, but include a statement describing the output in words What happens if you type G(:) and hit retum Do not include the output in your lab report, iclude a statement describing the output in words (e) What happens if you type G (5,3) and hi retun? Explain (f) What happens if you type max(G)? Explain What happens if you type sum(G)? Explain (g) What happens if you type GG>3) and hit retun? Can you explain how MATLAB got that answer? What happens if you type G(G>3)-100 and h return Can you explain how MATLAB got that answer? 2. Check some linear algebra rules: Enter the following matrices: -6 4 -3 12 , B= 4-16 , C= The following rules of algebra hold for real numbers However, most of them are false for matrices. Use the matrices A, B,C above to perform the appropriate operations in MATLAB and determine which rules are false. Below. O denotes the 2 2 zero matrix. Note that if a rule holds for these particular matrices, t does not mean that it is true in general. However, you should be able to determine that from the theory you have leamed in class G) (AB)2 A B (ii) If A2-0, then A = O ii) If BC-0, then B-0 or C-0 (iv) (A B)(A+B) A (v) A(B + C) = BA + CA (vi) (A+B)2-A2 +2AB + B2 (vii) A(B + C)-AB + AC 6. Create a big matrix with submatrices: The following matrix G is created by inserting the matrices A. B, and C from Exercise 3, together with zero matrices and 2 2 identity IS CONTENT S PROTROTRD AND MAY NOT HE SHARED, UPLOADED, SOLD OR DISTRIHUTED matrices in the appropriate position. Create the matrix using submatrices A, B, C, zeros and eye (that is, you are not allowed to enter the numbers explicitly) 1-5 0001 0 5 3 0 000 1 1 06 0-24 0 0-50--2-5 7. Manipulate a matrix: Do the following operations on matrix G created above in Problem 6 (a) Extract the 3 3 submatrix of G consisting of columns 3 through 5 and rows 1 through 3 and store it in the matrix H, that is, create a matrix 6 0-2 by extracting the appropriate rows and columns from the matrix G (b) Create the matrix E obtained fromH by replacing H20 by 5. Do not enter E explicitly. Hin enter first E-H to create a copy of the matrix H and then manipulate the matrix E. The resing matrix should be E=1500 6 0-2 (c) Create the matrx F obtained by deleting the third column of the matrix H. Do not enter F explicitly (d) What happens if you type G(:,:) and hit retum? Do not include the output in your lab report, but include a statement describing the output in words What happens if you type G(:) and hit retum Do not include the output in your lab report, iclude a statement describing the output in words (e) What happens if you type G (5,3) and hi retun? Explain (f) What happens if you type max(G)? Explain What happens if you type sum(G)? Explain (g) What happens if you type GG>3) and hit retun? Can you explain how MATLAB got that answer? What happens if you type G(G>3)-100 and h return Can you explain how MATLAB got that
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started