Hi,
Does anyone know how to return a submatrix from another one? E.g. a 3xn from an nxn.
What I've done is I've defined an 10x10 matrix using pointers. I can access the array elements using the standard notation - A[0][0] - and I can access the first row with A[0]. Is there any way of returning the first three rows?
I suppose there could be a way using pointers - e.g. a pointer pointing to the first three rows - but I still haven't gotten my head round them.
I don't suppose there's any way to access the columns aswell? E.g. A[*][0]? But I'm not too worried about this.
Thanks.
Does anyone know how to return a submatrix from another one? E.g. a 3xn from an nxn.
What I've done is I've defined an 10x10 matrix using pointers. I can access the array elements using the standard notation - A[0][0] - and I can access the first row with A[0]. Is there any way of returning the first three rows?
I suppose there could be a way using pointers - e.g. a pointer pointing to the first three rows - but I still haven't gotten my head round them.
I don't suppose there's any way to access the columns aswell? E.g. A[*][0]? But I'm not too worried about this.
Thanks.