2.2.2.1.1 Matlab::Attach

Description

Establishes connection to Matlab.

Syntax

BOOL Attach( BOOL bUseRunningInstance = TRUE, BOOL bSingle = FALSE, BOOL bKeepMatlabRunning = FALSE )

Parameters

bUseRunningInstance
if TRUE (default) attempt is made to reuse already established connection.
If that is not possible, or if the parameter is FALSE, new connection is made.
bSingle
bKeepMatlabRunning

Return

Returns TRUE if connection is being made, FALSE otherwise.

Examples

EX1

#include <ExternApps.h>

void Matlab_Attach_ex1()
{
     Matlab matObj;
     if ( !matObj.Attach() ) return;    //return if connection can not be made
     matObj.Attach(FALSE);            //Establish new connection destroying any previous connection first
}

Remark

See Also

Matlab::Detach

Header to Include

ExternApps.h