What script can I write to keep MATLAB running?

1 view (last 30 days)
My office has a set number of licenses for MATLAB so you need to wait until one opens up to use it and if you don't use yours for a few minutes you lose it. One way around this is to write a short script that keeps MATLAB executing some arbitrary function in the background so it always appears to be doing something.
I am brand new to MATLAB and a relatively novice programmer, though, and I wasn't given any suggestions on how to do this. Does anyone have any ideas or examples of how I might do this?
  1 Comment
Taner Cokyasar
Taner Cokyasar on 14 Jul 2016
Hello, I am not really sure if I got your question correctly. But, if you really want MATLAB always work on something, you can create an infinite loop on a file and run it. Thus, it always processes something.
For example:
Open up a new script and run this. I believe, it will be running forever.
i = 1;
for j = 1:inf
k = i;
end

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 14 Jul 2016
It is possible to set a usage timeout for MATLAB licenses, but the minimum timeout that can be set is 4 hours. If a location were timing out licenses faster than 4 hours of non-use, then the location would be in violation of the Mathworks license agreement:
5. LICENSE RESTRICTIONS. The License is subject to the express restrictions
set forth below and any other restrictions set forth in any signed agreement
between MathWorks and Licensee. Licensee shall not, and shall not cause or
permit any Affiliate or any Third Party to, directly or indirectly:
5.20. mechanize or automate the process of checking out or in license keys
for one or more Programs, including by running a second session of a
Program, running a Program to serve multiple users, or rebooting the
License Manager, for a principal purpose of minimizing the License check
out time of any Programs, or otherwise circumventing the intended License
Manager operation;

Categories

Find more on Manage Products in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!