From: Samuel on
I am knew at writing matlab code, and I have this problem. Given a 2D matrix, A, of any size [r,c]=size(A), I need to be able to write a function that finds a sub-section of the matrix A from the given inputs,
1. i=scalar, the row where the sub section begins,
2. j=scalar, the column where the sub section begins
3. m= number of rows in the sub-section
4. n= number of columns in the sub-section

From this the function must output the subsection of the matrix, subA. Does anyone know where I can find a method to do this?
From: dpb on
Samuel wrote:
> I am knew at writing matlab code, and I have this problem. Given a 2D
> matrix, A, of any size [r,c]=size(A), I need to be able to write a
> function that finds a sub-section of the matrix A from the given inputs,
> 1. i=scalar, the row where the sub section begins, 2. j=scalar, the
> column where the sub section begins
> 3. m= number of rows in the sub-section
> 4. n= number of columns in the sub-section
>
> From this the function must output the subsection of the matrix, subA.
> Does anyone know where I can find a method to do this?

doc colon

also read the "getting started" section on Manipulating Matrices

--