How can I open an engine connection against a specific license?
Ältere Kommentare anzeigen
engOpen lets me open a connection with Matlab engine. If I have 2 Matlab licenses, how can I tell the engine which to open?
Antworten (1)
Kaustubha Govind
am 13 Nov. 2012
On Windows, the MATLAB Engine will start whichever MATLAB installation was last registered as a COM server. Quoting the documentation:
On Windows systems, engOpen opens a COM channel to MATLAB. The MATLAB software you registered during installation starts. If you did not register during installation, on the command line you can enter the command:
!matlab /regserver
On *nix platforms, I believe it should start whichever version of MATLAB it locates first on the PATH and LD_LIBRARY_PATH environment variables (see How do I compile and run a MATLAB Engine program on UNIX/Linux/Mac?)
3 Kommentare
Walter Roberson
am 13 Nov. 2012
In *nix systems, when you start MATLAB you can specify the license file by establishing an LM_LICENSE_FILE environment variable that indicates the file. I wonder if the same thing can be done in this case, wonder whether the environment variables get noticed when ActiveX is started?
Kaustubha Govind
am 15 Nov. 2012
Randy: I don't know a whole lot about MATLAB license management, but if you can simply use the MATLAB startup option (-c licensefile) and you're on *nix, I wonder if you can use the startcmd parameter of the engOpen function to pass in the -c option.
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!