MAST10007 2022 SM2
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
MAST10007 2022 SM2
Assignment MATLABSampleTest closes Wed 12 Oct at 14:13
Problem 1. (1 point)
Important Information
There are a few key differences between the test enviroment and the normal assignment environment. Marks for each question are indicated at the start of each question.
The time remaining is displayed in the upper right corner.
Scroll down or use the ”Jump to Problem” buttons (above) to move between questions. You may use the tab key to move between input boxes.
—————————————————————————————-
A warm-up question to help you get used to entering answers.
Let Z = ┌ 3(1) 4(2) !.
If you wish, you may copy and paste the following line of code into MATLAB to save from typing Z in manually.
¡code¿Z = [1,2;3,4]¡/code¿
Use MATLAB to calculate the inverse of the matrix Z = ┌ 3(1) 4(2) !.
Enter your answer here: Z_ 1 = ┌ !
—————————————————————————————-
The ”Preview Answers” button allows you to see the answers you have entered. You are strongly encour- aged to preview your answers before moving on to the next question, to help check for syntax errors or typos. You will see the message ”Preview only - answers not recorded”, which means that your answers have not been submitted for grading.
Once you have completed the test and are ready to submit, use the ”Grade test” button to submit your test.
Important: On test day, you must click ”Grade test”at the end of the test. Otherwise, your test will not be graded and you will receive zero for the attempt.
When you submit the sample test, you will see your total mark and results for each question. Full answers or solutions are not available.
For the real MATLAB test, you will not see your total mark or results when you submit. Marks will be released at a later date.
When you feel comfortable with navigating the test environment, complete the rest of the sample test.
Answer(s) submitted:
●
(incorrect)
Correct Answers:
●
!
Problem 2. (4 points)
Consider the following matrix ┌! 0(2) !(!) 0 !(!) 0 ! 0 ! ! 11 ! ! 11 │ 11 |
0 2 0 0 0 11 11 11 11 11 |
0 0 2 0 0 11 11 11 11 11 |
0 0 0 2 0 11 11 11 11 11 |
0 0 0 0 2 11 11 11 11 11 |
6 6 6 6 6 1 6 6 6 6 |
6 6 6 6 6 6 1 6 6 6 |
6 6 6 6 6 6 6 1 6 6 |
6 6 6 6 6 6 6 6 1 6 |
6(6) ┐! 6 !(!) 6 !(!) 6 !(!) 6 !(!) 6 ! ! 6 ! 1 │ |
The MATLAB code to produce P is given by:
P= [2*eye(5),6*ones(5);11*ones(5),6*ones(5)-5*eye(5)]
(1) Calculate the dot product of row 10 and column 6 of P.
(2) Let Q = ^3P_ 1 . Calculate det(PQ).
(3) Calculate rank(P + 5I).
(4) Let:
a denote the vector corresponding to column 4 of P,
b denote the vector corresponding to column 9 of P,
c denote the vector corresponding to row 1 of P.
Calculate the 8th entry of the linear combination: _2a _ 2b + 4c
Click Preview Answers to check that you have entered your answer correctly before going on to the next question.
Answer(s) submitted:
.
.
.
.
(incorrect)
Correct Answers:
. 450
. 243
. 6
. -10
Problem 3. (2 points) Consider the following matrix ┌! 2(2) A = !(!) _2 ! _ 1 │ 1 |
2 _ 1 0 0 0 |
_4 2 _ 1 1 1 |
1 1 _ 1 _ 1 0 |
2_2 ┐! 1 ! 0 ! _ 1 │ |
The MATLAB code to produce A is given by:
A = [2,2,-4,1,2;2,-1,2,1,-2;-2,0,-1,-1,1;-1,0,1,-1,0;1,0,1,0,-1]
(1) Enter the entries in row 4 of A_ 1
[ ]
(2) Find the general solution of the following linear system.
┌!x(x)2(1)┐! ┌! _26 ┐!
A !(!)x3!(!) = !(!) 0 !(!)
!│x(x)5(4)!│ !│ 0_1 !│
Answer:
┌!x(x)2(1)┐! ┌! ┐!
!(!)x3 !(!) = !(!) !(!)
!│x(x)5(4)!│ !│ !│
Click Preview Answers to check that you have entered your answer correctly before going on to the next question.
Answer(s) submitted:
●
●
(incorrect)
Correct Answers:
[ _ 1 _2 _2 _2 0 ]
●
┌! _(_)2(1) ┐!
!(!) 1 !(!)
! 2 !
│ 1 │
Problem 4. (6 points) Consider the matrix ┌! _(_)2(1) ! 1 C = 3 ! _4 │ 3 The MATLAB code to produce C is given by: |
_2 _4 5 6 _8 5 |
_5 _ 19 11 15 _20 13 |
0 0 0 6 _2 0 |
2(1) ┐! _4 !(!) 9 !(!) 0 ! _2 │ |
¡code¿C = [-1,0,-2,-5,0,1; -2,-3,-4,-19,0,2; 1,0,5,11,0,-4; 3,0,6,15,6,9; -4,0,-8,-20,-2,0; 3,0,5,13,0,-2]¡/code¿
Let S = {ay by cy dy ey f} where
a(x) = _ 1 _ 2x + x2 + 3x3 _ 4x4 + 3x5 y
b(x) = _3xy
c(x) = _2 _ 4x + 5x2 + 6x3 _ 8x4 + 5x5 y
d(x) = _5 _ 19x + 11x2 + 15x3 _ 20x4 + 13x5 y
e(x) = 6x3 _ 2x4 y
f(x) = 1 + 2x _ 42x + 9x3 _ 2x5 ●
(1) Find the reduced row echelon form of C:
Answer:
┌ ┐
! !
! !
! !
! !
! !
! !
│ │
(2) Write down a set of vectors from S that forms a basis for Span (S): , 、.
Enter your answer as a list of vectors separated by commas, e.g. a,b,c. Write the polynomials just as a, b etc., not as a(x).
(3) What is the dimension of Span (S)?
2022-10-15