Starting from:

$25

ECE210-Homework 1 Solved

1.    Create scalar variables with the following values:

 

Give these variables unique and reasonable names. Using these variables (not the expressions) create a column vector with each variable as an entry.

2.    You should have two complex variables from the previous question. Multiply thetwo together (using the variables again) and save that as a variable. Compute the real part, imaginary part, magnitude and angle of the resulting complex number and create a row vector using those values as entries.

3.    Now with the two vectors from the previous questions, create and save as variablestwo 4x4 matrices as follows:

•    Regular matrix multiplication (make sure the vectors are in the right order! I want a 4x4 matrix, not a scalar, i.e. an outer product, not an inner product)

•    Transpose (regular transpose not conjugate transpose) the column vector and multiply it elementwise with the row vector. Then use repmat to extend this row vector to a 4x4 matrix (use help or doc if you don’t remember how to use repmat).

4.    With these two matrices, perform the following operations (save the results as variables):

•    Add the first and two times the second

•    Elementwise multiply them

•    Subtract two from every entry in the first matrix

•    Conjugate transpose either one

5.    Take the angle of the complex number in question 2 and convert it to degrees (checkout rad2deg). It should be an integer. Save the value as n. Then create these two row vectors:

•    A length 2000 vector with equally spaced entries from 1 to n

•    A vector with entries starting at one up to n with entries spaced at intervals of 0.3 (the vector may turn out to not include n)

You will be using both linspace and the colon operator here. Make sure to use the right one for each!

More products