Function: imatrix Purpose: Allocate space for a matrix with subscript range M[ylo..yhi][xlo..xhi] for integers. Category: UTILITY File: matrix.c Author: M. Vogelaar Use: int **imatrix( int xlo, int ylo, int xhi, int yhi ); imatrix : Output pointer to array of pointers to array of integers. e.g. the matrix M[ylo..yhi][xlo..xhi] xlo : First subscript in x ylo : First subscript in y xhi : Last subscript in x yhi : Last subscript in y Example: int **image; image = imatrix( blo[0], blo[1], bhi[0], bhi[1] ); x = 3; y = 0; element = M[y][x]; freeimatrix( blo[0], blo[1] ); Comment: This routine is NOT callable from FORTRAN. Notes: After freeing memory with 'freedmatrix' the pointer to the matrix is NOT reset to NULL. Updates: 28 Jul, 2000: VOG, Document created.