# MatGetColumnIJ
Returns the compressed column storage i and j indices for sequential matrices. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatGetColumnIJ(Mat mat, PetscInt shift, PetscBool symmetric, PetscBool inodecompressed, PetscInt *n, const PetscInt *ia[], const PetscInt *ja[], PetscBool *done)
```
Collective


## Input Parameters

- ***mat -*** the matrix
- ***shift -*** 1 or zero indicating we want the indices starting at 0 or 1
- ***symmetric -*** `PETSC_TRUE` or `PETSC_FALSE` indicating the matrix data structure should be
symmetrized
- ***inodecompressed -*** `PETSC_TRUE` or `PETSC_FALSE` indicating if the nonzero structure of the
inodes or the nonzero elements is wanted. For `MATBAIJ` matrices the compressed version is
always used.
- ***n -*** number of columns in the (possibly compressed) matrix
- ***ia -*** the column pointers; that is ia[0] = 0, ia[col] = i[col-1] + number of elements in that col of the matrix
- ***ja -*** the row indices



## Output Parameters

- ***done -*** `PETSC_TRUE` or `PETSC_FALSE`, indicating whether the values have been returned





## See Also
 `Mat`, `MatGetRowIJ()`, `MatRestoreColumnIJ()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatGetColumnIJ">src/mat/interface/matrix.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatGetColumnIJ_SeqAIJ">MatGetColumnIJ_SeqAIJ in src/mat/impls/aij/seq/aij.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/baij/seq/baij.c.html#MatGetColumnIJ_SeqBAIJ">MatGetColumnIJ_SeqBAIJ in src/mat/impls/baij/seq/baij.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
