:orphan:
# MatGetColumnMeansRealPart
Gets the arithmetic means of the real part of each column of a sparse or dense matrix. 
## Synopsis
```
#include "petscmat.h"  
PetscErrorCode MatGetColumnMeansRealPart(Mat A, PetscReal means[])
```

## Input Parameter

- ***A -*** the matrix



## Output Parameter

- ***sums -*** an array as large as the TOTAL number of columns in the matrix





## Note
Each process has ALL the column means after the call. Because of the way this is computed each process gets all the values,
if each process wants only some of the values it should extract the ones it wants from the array.


## See Also
 [](ch_matrices), `Mat`, `MatGetColumnMeansImaginaryPart()`, `VecSum()`, `MatGetColumnSums()`, `MatGetColumnNorms()`, `MatGetColumnReductions()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/utils/getcolv.c.html#MatGetColumnMeansRealPart">src/mat/utils/getcolv.c</A>


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