Description
This homework is NOT for a grade. It is intended to give you practice with the basics of Matlab, and, more importantly, give you practice submitting an assignment to
Scorelator. Unlike future assignments, you have ten attempts.
1. Variables and Basic Computation Define the following variables in Matlab:
x = 10, y = −2, z = π.
(a) Save z in the file A1.dat.
(b) Calculate x + y − z and save your answer in the file A2.dat.
(c) Calculate x3 and save your answer in the file A3.dat.
(d) Calculate e−y and save your answer in the file A4.dat.
(e) Calculate cos(zy) and save your answer in the file A5.dat.
2. Matrices and Vectors Define the following matrices and vectors in Matlab:
1 −2
, x = 2 , y = 0 ,
−1 1
(a) Save x in the file A6.dat.
(b) Save the second row of A in the file A7.dat.
(c) Calculate x − y and save your answer in the file A8.dat.
(d) Calculate Ay and save your answer in the file A9.dat.
(e) Calculate A(x + y) and save your answer in the file A10.dat.
Reviews
There are no reviews yet.