How can I open an engine connection against a specific license?

6 views (last 30 days)
engOpen lets me open a connection with Matlab engine. If I have 2 Matlab licenses, how can I tell the engine which to open?

Answers (1)

Kaustubha Govind
Kaustubha Govind on 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 Comments
Walter Roberson
Walter Roberson on 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
Kaustubha Govind on 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.

Sign in to comment.

Categories

Find more on Manage Products in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!