:orphan:
# PetscViewerMatlabGetArray
Gets a variable from a `PETSCVIEWERMATLAB` viewer into an array 
## Synopsis
```
PetscErrorCode PetscViewerMatlabGetArray(PetscViewer mfile, int m, int n, PetscScalar *array, const char *name)
```
Not Collective; only processor zero reads in the array


## Input Parameters

- ***mfile -*** the MATLAB file viewer
- ***m -*** the first dimensions of `array`
- ***n -*** the second dimensions of `array`
- ***array -*** the array (represented in one dimension)
- ***name -*** the MATLAB name of `array`





## Note
Only reads in `array` values on processor 0.


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

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/matlab/vmatlab.c.html#PetscViewerMatlabGetArray">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
