# MatNullSpaceSetFunction
set a function that removes a null space from a vector out of null spaces. 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatNullSpaceSetFunction(MatNullSpace sp, PetscErrorCode (*rem)(MatNullSpace, Vec, void *), void *ctx)
```
Logically Collective on sp


## Input Parameters

- ***sp -*** the `MatNullSpace` null space object
- ***rem -*** the function that removes the null space
- ***ctx -*** context for the remove function





## See Also
 `MatNullSpace`, `MatNullSpaceDestroy()`, `MatNullSpaceRemove()`, `MatSetNullSpace()`, `MatNullSpace`, `MatNullSpaceCreate()`

## Level
advanced

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matnull.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)  
