# PETSC_MATLAB_ENGINE_
Creates a MATLAB engine on each process in a communicator. 
## Synopsis
```
#include "petscmatlab.h"  
PetscMatlabEngine PETSC_MATLAB_ENGINE_(MPI_Comm comm)
```
Not Collective


## Input Parameter

- ***comm -*** the MPI communicator to share the engine



## Options Database Key

- ***-matlab_engine_host -*** hostname on which to run MATLAB, one must be able to ssh to this host





## Note
Unlike almost all other PETSc routines, this does not return
an error code. Usually used in the form
```none
PetscMatlabEngineYYY(XXX object,PETSC_MATLAB_ENGINE_(comm));
```


## See Also
 `PetscMatlabEngineDestroy()`, `PetscMatlabEnginePut()`, `PetscMatlabEngineGet()`,
`PetscMatlabEngineEvaluate()`, `PetscMatlabEngineGetOutput()`, `PetscMatlabEnginePrintOutput()`,
`PetscMatlabEngineCreate()`, `PetscMatlabEnginePutArray()`, `PetscMatlabEngineGetArray()`, `PetscMatlabEngine`,
`PETSC_MATLAB_ENGINE_WORLD`, `PETSC_MATLAB_ENGINE_SELF`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/matlabengine/matlab.c.html#PETSC_MATLAB_ENGINE_">src/sys/classes/matlabengine/matlab.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5.c.html">src/snes/tutorials/ex5.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex55.c.html">src/snes/tutorials/ex55.c.html</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
