For this assignment, you should hand in both a written part and a printed part. For the printed part, you should copy and paste your MATLAB commands and output into a Word (or similar) document. Set the document font to Courier New. Remove any extraneous/erroneous commands and augment your MATLAB output to clearly indicate where one problem begins and the next one begins.

- 1)
- (2 pts) Define the following variables:

Perform the following computations in MATLAB and verify the results by hand.- a)
`a^2`

- b)
`a*b`

- d)
`a < b`

- e)
`a == b`

- 2)
- (1 pt) For
*a*and*b*as defined in Problem 1), answer the following- a)
- What is +a'+?
- b)
- What is +conj(a)+?
- c)
- Explain why a) and b) are the same.
- d)
- Are +a+ and +b+ complex conjugates? Why or why not?

- 3)
- (2 pts) Give the command that will create a row vector from -1 to 1
in steps of 0.1 and store it in the variable
*x*. What are the dimensions of*x*(hint: use the +size+ command)? Give the output from the following commands and explain the results. If you encounter an error, explain why the error occurs.- a)
- +x(2)+
- b)
- +x(1:11)+
- c)
- +x(0:22)+
- d)
- +x(1:2:21)+
- e)
- +x(21:-1:10)+
- f)
- +x(1:.1:2)+

- 4)
- (4 pts) Create the matrix

Give the output of each command and explain the results. If you encounter an error, explain why the error occurs.- a)
- +A(3,1)+
- b)
- +A(2,3)+
- d)
- +A(1,0)+
- e)
- +A(:,2)+
- f)
- +A(:,1:2:3)+
- g)
- +A(1,:)+
- h)
- +A(1:2,2:3)+
- i)
- +A'+

- j)
- +A(:,jj)+
- k)
- +A(ii,:)+
- l)
- +A(ii,jj)+

- 5)
- (2 pts) Give the commands that will create the following quantities:

Now give the command that will use*D*,*e*and*f*to build the matrix*A*from Problem 4). - 6)
- (6 pts) Create the following vectors in MATLAB:

Can the following operations be performed? If yes, give the result and verify by hand computation. If not, completely explain why not.- a)
- +x * w+
- b)
- +w * w+
- c)
- +w' * w+
- d)
- +y' * z+
- e)
- +y * z+
- f)
- +y * y'+
- g)
- +y .* w+
- h)
- +y .* w'+
- i)
- +x .* z+
- j)
- +x ./ y+

- 7)
- (8 pts)
Create the following quantities in MATLAB:

Can the following operations be performed? If yes, give the result and verify by hand computation. If not, completely explain why not.- a)
- +A * x+
- b)
- +x * A+
- c)
- +A * y+
- d)
- +y * A+
- e)
- +A' * x+
- f)
- +A * y'+
- g)
- +y' * A * x+

- 8)
- (6 pts)
Create the following matrices in MATLAB:

Can the following operations be performed? If yes, give the result and verify by hand computation. If not, completely explain why not.- a)
- +A * B+
- b)
- +A * C+
- c)
- +C * A+

- 9)
- (2 pts)
Let
*y*be defined as in Problem 6). Perform the following calculations and verify the results by hand:- a)
- +z = y.^3+
- b)
- +z = sqrt(y.*y)+

- 10)
- (4 pts)
Let
*D*be defined as in Problem 5). Perform the following calculations and verify by hand.- a)
- +C1 = D^2+
- b)
- +C2 = D.^2+

- 11)
- (2 pts) EXTRA CREDIT: You know that
If you have MATLAB
compute this, you get the following result:
>> (-1)^(1/3) ans = 0.5000 + 0.8660i

This is correct, but probably not what you expected. Explain how MATLAB obtained this result.