:orphan: # MatChop Set all values in the matrix less than the tolerance to zero ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatChop(Mat A, PetscReal tol) ``` ## Input Parameters - ***A -*** The matrix - ***tol -*** The zero tolerance ## See Also [](ch_matrices), `Mat`, `MatCreate()`, `MatZeroEntries()` ## Level intermediate ## Location src/mat/utils/axpy.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/utils/axpy.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)