:orphan:
# MatDenseRestoreSubMatrix
Returns access to a block of columns of a dense matrix obtained from MatDenseGetSubMatrix().
## Synopsis
```
#include "petscmat.h"
PetscErrorCode MatDenseRestoreSubMatrix(Mat A, Mat *v)
```
Collective
## Input Parameters
- ***mat -*** the `Mat` object
- ***v -*** the `Mat` object (may be `NULL`)
## See Also
[](ch_matrices), `Mat`, `MATDENSE`, `MATDENSECUDA`, `MATDENSEHIP`, `MatDenseGetColumnVec()`, `MatDenseRestoreColumnVec()`, `MatDenseGetSubMatrix()`
## Level
intermediate
## Location
src/mat/impls/dense/seq/dense.c
## Implementations
MatDenseRestoreSubMatrix_MPIDense in src/mat/impls/dense/mpi/mpidense.c
MatDenseRestoreSubMatrix_SeqDense in src/mat/impls/dense/seq/dense.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/dense/seq/dense.c)
[Index of all Mat routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)