| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
#include "engine.h" int engClose(Engine *ep);
integer*4 engClose(ep) mwPointer ep
0 on success, and 1 otherwise. Possible failure includes attempting to terminate a MATLAB engine session that was already terminated.
This routine sends a quit command to the MATLAB engine session and closes the connection.
See engdemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program.
See engwindemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program for Windows® systems.
See fengdemo.F in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a Fortran program.
[1] UNIX is a registered trademark of The Open Group in the United States and other countries.
![]() | C and Fortran API Reference | engEvalString (C and Fortran) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |