# MatZeroEntries

Zeros all entries of a matrix. For sparse matrices this routine retains the old nonzero structure.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode PETSCMAT_DLLEXPORT MatZeroEntries(Mat mat)

Collective on Mat

### Input Parameters

mat -the matrix

### See Also

MatZeroRows()

Level:intermediate
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/examples/tutorials/ex5.c.html
src/ksp/examples/tutorials/ex9.c.html
src/snes/examples/tutorials/ex26.c.html
src/ts/examples/tutorials/util2.c.html