:orphan:
# PetscMatlabEngineGet
Gets a variable from MATLAB into a PETSc object.
## Synopsis
```
#include "petscmatlab.h"
PetscErrorCode PetscMatlabEngineGet(PetscMatlabEngine mengine, PetscObject obj)
```
Collective
## Input Parameters
- ***mengine -*** the MATLAB engine
- ***object -*** the PETSc object, for example a `Vec`
## Note
`Mat`s transferred between PETSc and MATLAB and vis versa are transposed in the other space
(this is because MATLAB uses compressed column format and PETSc uses compressed row format)
## See Also
`PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineCreate()`,
`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,
`PETSC_MATLAB_ENGINE_()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`
## Level
advanced
## Location
src/sys/classes/matlabengine/matlab.c
## Examples
src/snes/tutorials/ex5.c
src/snes/tutorials/ex55.c
src/vec/vec/tutorials/ex31.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/matlabengine/matlab.c)
[Index of all Sys routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)