Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: opening full matlab with engopen
Date: Sat, 7 Nov 2009 05:39:01 +0000 (UTC)
Organization: Drexel University
Lines: 14
Message-ID: <hd315l$93i$1@fred.mathworks.com>
References: <h8nlp2$47b$1@fred.mathworks.com> <hcotpm$7vq$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257572341 9330 172.30.248.37 (7 Nov 2009 05:39:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 7 Nov 2009 05:39:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 778372
Xref: news.mathworks.com comp.soft-sys.matlab:583181


In Windows, this works.

Start Matlab from the command line, using the following options:
C:\Program Files\MATLAB\R2009a\bin\matlab.exe -automation -desktop

This starts the Automation server, but with the Matlab desktop displayed too (it won't display by default). In your C program, use engSetVisible(ep, 0) to keep the extra command line from popping up.

if (!(ep = engOpen(NULL)))
{
    fprintf(stderr, "\nCan't start MATLAB engine\n");
    return EXIT_FAILURE;
}

engSetVisible(ep, 0);