What is a good workaround to prevent tying up a toolbox without exiting Matlab? It sounds like I can't create an executable which contains the toolbox function.

5 views (last 30 days)
I am in a group which uses a function which invokes the Imaging toolbox. Others use this function as well, but they can't until I've exited Matlab to release the function. I thought that we might be able to code around the problem by creating an executable which contains the imaging function needed and then invoke the executable, but from what I've read the compiled function will not run. There is also no inline function which will allow me to release the license once I'm done with it. Is there an effective way of managing this bottleneck without restarting Matlab? Why is the licensing done this way?

Answers (2)

Dave Murphy
Dave Murphy on 7 Mar 2016
Thanks for your quick response. From what you've stated it sounds like I can create an *.exe executable which uses an Imaging Toolbox function and anyone with the MCR installed on their computer should be able to run the executable without invoking the Imaging Toolbox license. Is that correct? If so, that would be sufficient for our purposes.
  1 Comment
Walter Roberson
Walter Roberson on 7 Mar 2016
Correct, a compiled executable only uses the toolbox license during the compilation period itself, not during execution.
If the executable your produce has a fixed purpose and does not (for example) run user scripts as a backdoor way of getting full access to MATLAB, then what you propose sounds like it would be within the license terms.

Sign in to comment.


Walter Roberson
Walter Roberson on 4 Mar 2016
Compiled executables in .exe form (or equivalent for other operating systems) do not use up a toolbox license when they are executed. Functions compiled to mex or DLL do use up a toolbox license when they are executed.
Up to and including R2015b, the process of compiling does not use up a toolbox license for the toolboxes being compiled in (just for the Compiler toolbox itself.) As of R2016a, the process of compiling will check each of those toolboxes out for 30 minutes and Mathworks will consider it a violation of license terms if you do something like deliberately restart the license server to force the toolboxes to be available.
There is no tool to request that a toolbox be released. There is a way to request that MATLAB automatically release "idle" licenses, features that you have not used in a while; see http://www.mathworks.com/help/install/license/using-time-outs-to-free-idle-license-keys.html and notice that the minimum timeout is 4 hours.
It sounds to me as if you will likely need to obtain another license for the toolbox.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!