MATLAB Test
Test duration: 45 minutes
This paper has 6 test pages
Please complete all the following details.
Name:
Student Number:
Tutor’s Name:
Tutorial Time and Day:
.....................................................
.....................................................
.....................................................
.....................................................
Instructions to Students:
This examination is designed to test your ability to calculate efficiently with the aid of MATLAB as well as your knowledge of the material covered so far in the subject.
No materials are allowed and you may not open computer packages other than MATLAB.
No partial credit is given, so please carefully check anything typed into MATLAB, and check the output of any programs used.
(1) Before starting the test load the programs for your test:
♣ Start up Matlab.
♣ Open the folder on the desktop: M&S-Lab Materials (the tree) and then the folder MAST10007/Tests contained therein.
♣ Copy the folder TESTSAMPLETEST to the desktop or My Documents.
♣ Drag the folder into MATLAB’s current folder window.
♣ Right click on the folder in the current window and choose to “Add to the path”, “Selected folders and subfolders”.
(2) Some MATLAB commands: rref(A) eye(n)
dot(x,y)
A’
ones(m,n)
cross(x,y)
det(A)
zeros(m,n)
mod(x,2)
inv(A)
rank(A)
rrefmod2(A) gives the reduced row echelon form of A using modulo 2 arithmetic plot2dd(A) draws a graph connecting points in R2 whose coordinates are in the columns of A.
(3) Unless otherwise indicated, answers may be either exact or a numerical solution correct to 4 significant figures or correct to 4 decimal places.
(4) There are 6 questions. The number of marks for each question is indicated and the total is 22.
Do not turn over the page until instructed to do so.
Rough working – will not be marked
TESTSAMPLE
MAST10007 Linear Algebra
1. Run the program Q01SAMPLE to input the matrix
4 0 0 0
0 4 0 0