To see the sub-matrix with a$_{ij}$ for 2<=i<=4 and 1<=j<=2 of a matrix a, of order 5*6, which code is used?

Man Ly

New member
To see the sub-matrix with a$_{ij}$ for 2<=i<=4 and 1<=j<=2 of a matrix a, of order 5*6, which code is used?
A. a(2;4,1;2)
B. a(2,4:1,2)
C. a(2:4,1:2)
D. a(2,4;1,2)
 
Answer: c
Explanation: To see the sub-matrix of a matrix a, of any order (here 5*6), the following syntax is used: matrix name(2:4,1:2). Here, ‘2:4’ mentions rows from 2 to 4 while ‘1:2’ mentions the columns from 1 to 2. This is a pre-defined form of viewing or making a sub-matrix of a matrix in MATLAB.
 

Tìm kiếm

Back
Top