MATLAB: How to test the license for a toolbox in MATLAB

MATLAB

I am trying to determine whether or not the licensing is working for a particular toolbox. If I cannot check out the license, I would like to see why I cannot check out a toolbox license in MATLAB. How can I accomplish this?

Best Answer

To test the license for a particular toolbox, you can use the license checkout command within MATLAB.
To use this command, you must use the feature name of the product as it appears in the license file rather than the actual toolbox name. To find your license file, see the related solution 1-63ZIR6 below, "Where are the license files for MATLAB located?". If you are on a network license and do not have access to the license file, you can also use the feature name as it appears in the output of lmstat. To learn more about using lmstat, see the solution 1-15S3Ubelow, "How do I monitor the usage of licenses or keys for MATLAB and the Toolboxes?"
For example, if you would like to test the license for Control System Toolbox, you would type the following in MATLAB:
license checkout Control_Toolbox
If this command returns the following output, the licensing is working properly:
ans=1
If the toolbox cannot get a license, you will get both a network license manager error number as well as a brief explanation as to why this toolbox license cannot be checked out. See the related solutions below for some common license manager errors.
Note that this command will only show a single license manager error. Sometimes, especially with network licenses, there are multiple license manager errors occurring. MATLAB will only print the last license manager error received. If this is a network license, more information can be found in the license manager log file.
If you need further asisstance, contact Installation and Licensing technical support.