Question

1. Enter the following matrices into MATLABO. Don't clear your work after you enter them. A=\left(\begin{array}{cc} -1 & 1 \\ 2 & 3 \end{array}\right), \quad B=\left(\begin{array}{ll} 1 & 2 \\ 3 & 4 \end{array}\right), \quad C=\left(\begin{array}{ccc} 1 & 2 & 3 \\ -2 & 6 & 9 \end{array}\right), \quad D=\left(\begin{array}{cccc} 2 & 2 & -2 & 4 \\ 1 & 3 & 5 & 7 \\ 2 & 4 & 6 & 8 \end{array}\right) 2. Using the above matrices, find A * B and B * A by hand, and then using MATLAB. 3. The rand function creates a row vector, column vector, or matrix with pseudo-random entries between 0 and 1. (type help rand for more information).Create a new matrix F which is 3 x 3 and has all random entries. 4. Store the first column of F in a vector called x, and then replace the second column of D by x. What happens if you try to replace the second column ofC by x? 5. An important operator that you will find useful in MATLAB is the : operator. It allows us to easily create vectors with equally spaced elements. For example, type z = 1:10 into MATLAB© and describe the results. Next type w = 1:2:10 into MATLAB© and describe the results. What does the middle term :2: determine? Now using this idea and the : operator to replace the first row of D with the vector (2, 4, 6, 8). 6. One nice thing about arrays and matrices is that most built-in functions for MATLAB will work using arrays and matrices as inputs. To see this, use the :(0.5..2).operator to create the vector y =Then enter sin(y) and explain the results.

Fig: 1

Fig: 2

Fig: 3

Fig: 4

Fig: 5

Fig: 6

Fig: 7