Using Matlab and give me the Matlab code
1. Set matrix M=[3 2 1; 6 5 4; 9 7 8 ], try to answer the following questions in order:
Each sub-problem is operated independently using the original matrix M.
(a) (5%) Extract the elements in the 3rd column and the 1st row of matrix M.
(b) (5%) Extract the first and second elements of the second column in the matrix M
(c) (5%) Take all elements in column 2 of matrix M.
(d) (5%) Extract the first and third elements of the last column of matrix M.
(e) (5%) Add a row vector of all zeros to the rightmost edge of matrix M.
(f) (5%) Delete the last row of matrix M.
(g) (5%) Extract the elements from the Ist to the 2nd rows in the Ist to the 2nd columns of the matrix M.
Using Matlab and give me the Matlab code 1. Set matrix M=[3 2 1; 6 5 4; 9 7 8 ], try to answer the following questions
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am