Question: FOR MATLAB Create the following matrices, and use them in the exercises that follow: A = [ 15 3 22 3 8 5 14 3
FOR MATLAB
Create the following matrices, and use them in the exercises that follow:
A = [ 15 3 22
3 8 5
14 3 8 ]
B = [ 1 5 6]
C = [12 18 5 2]
1. Extract the first two columns from matrix A.
2. Extract the last two columns from matrix A.
3. Extract the last row from matrix A
4. Extract the following sub-matrix x from matrix A
X= [ 15 3
3 8]
5. Compute the sum of the third row matrix A.
6. Compute the sum of the first column from matrix A.
7. Create a matrix called D from the third column of matrix A.
8. Combine matrix B and D to create matrix E, a two-dimensional matrix with three rows and two columns
9. Combine matrix B and matrix D to create matrix F, a one-dimensional matrix with six rows and one column
10. Create a matrix G from matrix A and the first three elements of matrix C, with four rows and three columns.
11. Create a matrix H with the first element equal to A1, 3, the second element equal to C1,2 and the third element equal to B2,1
12. Find the largest and the smallest element in each column of matrix A and their indices.
13. Sort each column in matrix A to create a new matrix J.
14. Transpose the matrix A and create the following matrix K
K = [ 15 3 22
3 8 5
14 3 8
15 3 14
3 8 3
22 5 8]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
