Main Content

engClose (C)

Quit MATLAB engine session

C Syntax

#include "engine.h"
int engClose(Engine *ep);

Description

Send a quit command to the MATLAB® engine session and close the connection. Returns 0 on success and 1 on failure. Possible failure includes attempting to terminate an already-terminated MATLAB engine session.

Input Arguments

expand all

Pointer to engine, specified as Engine *.

Examples

See these examples in matlabroot/extern/examples/eng_mat:

  • engdemo.c for a C example on UNIX® operating systems.

  • engwindemo.c for a C example on Microsoft® Windows® operating systems.

Version History

Introduced before R2006a

See Also