Suppose that A is a 10 x 10 matrix, and we want to extract a submatrix consisting of rows 5 to 9, and columns 3 to 8 of
Posted: Thu May 12, 2022 2:33 pm
Suppose that A is a 10 x 10 matrix, and we want to extract a submatrix consisting of rows 5 to 9, and columns 3 to 8 of A. What single Matlab command (using 10 characters or less) could accomplish this? (Assume that the matrix A has already been defined in Matlab, and has been called A.) Note that for this question you should test your answer to see if it works. For this purpose it would be useful to have a 10 x 10 matrix sitting around somewhere. There are several ways to quickly generate matrices in Matlab. For example, rand (10) will produce a 10 x 10 matrix whose entries are random numbers between 0 and 1. magic (10) will produce a 10 x 10 magic square matrix.