# PetscViewerMatlabPutArray
Puts an array into the `PETSCVIEWERMATLAB` viewer. 
## Synopsis
```
PetscErrorCode PetscViewerMatlabPutArray(PetscViewer mfile, int m, int n, const PetscScalar *array, const char *name)
```
Not collective: only processor zero saves the array


## Input Parameters

- ***mfile -*** the viewer
- ***m,n -*** the dimensions of the array
- ***array -*** the array (represented in one dimension)
- ***name -*** the name of the array





## Note
Only writes array values on processor 0.


## See Also
 `PETSCVIEWERMATLAB`, `PetscViewerMatlabGetArray()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/matlab/vmatlab.c.html#PetscViewerMatlabPutArray">src/sys/classes/viewer/impls/matlab/vmatlab.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/matlab/vmatlab.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
