Posted: November 10th, 2014

Matlab coursework Engineering and Computing

Matlab coursework

Engineering and Computing

Assessment Task 1
(33 Marks)

Please complete the following exercise and write a concise sub-report documenting and explaining your solutions (MAXIMUM 4 pages). Please note that your report must reference any sources, such as textbooks or web pages, that you have used to help develop your solution

This homework is designed to teach you to think in terms of matrices and vectors because this is how Matlab organizes data. You will find that complicated operations can often be done with one or two lines of code if you use appropriate functions and have the data stored in an appropriate structure. The other purpose of this homework is to make you comfortable with using help to learn about new functions. The names of the functions you’ll need to look up are provided in bold where needed. Homework must be submitted before the end day of 13/Nov/2014.
What to turn in: Copy the text from your scripts and paste it into a document. If a question asks you to plot or display something to the screen, also include the plot and screen output your code generates. Submit a printed report and email me the .doc or .pdf file.
Write a script called Assignment1.m and put all the commands of problems 1 to 7 in it. Separate and label different problems using comments. For problem 8 create separate functions files.
1.    Scalar variables. Make the following variables (3 marks) a) a = 15
b)    b = 4.3 ×10 26
c)    c = e2π /3 , where e is Euler’s number (use exp, pi)

2.    Vector variables. Make the following variables (5 marks)
a)    v1 =[3.14    15    9    26]
b)    v2
c)    v3 =[6    5.7    ⋯    −5.7   −6] (all the numbers from 6 to -6 in increments of -0.3)
d)    v4 = [100    100.01 ⋯ 100.99     101] (logarithmically spaced numbers between 1 and 10, use logspace, make sure you get the length right!)

e)    v5 = “Hello Matlab World” (contains string, which is a vector of characters)

3.    Matrix variables. Make the following variables (7 marks)
a)    m1 is a 7×7 matrix full of 2’s (use ones or zeros)

b)    m2 is a 9×9 matrix of all zeros, but with the values  [1 2 3 4 5 4 3 2 1]  on the main diagonal (use zeros, diag)

c)    m3 is a 10×10 matrix where the vector 1:100 runs down the columns (use reshape).

d)    m4 is a 3×2 matrix of integer numbers
e)    m5 is a 5×3 matrix of random integers with values on the range -2  to 2 (use rand and floor or ceil)

4.    Scalar equations. Using the variables created in 1, calculate x and y. (2
Marks)
a)

b)    

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Live Chat+1-631-333-0101EmailWhatsApp