Code covered by the BSD License
15 Jun 2002
22 Nov 2010)
Change the priority of the MATLAB Process programatically.
Watch this File
**WINDOWS only - must be compiled before use**
If you want to do some heavy processing and you don't want your computer to get all sluggish whilst it's going on, you can use this tool thusly:
pri=priority('l') % set priority to low
priority(pri) % set it back
I've been using this for many years. It's a great little tool!
No, they don't. I've uploaded just source, then. Thanks anyway
Hmmm... do mathworks still allows us to upload binaries? I've a funny feeling they started outlawing that. We'll see, I just tried uploading a version with a win32 binary.
Ben: Got it solved. It wasn't Windows 7 that was the problem. Instead, I was on 64-bit Matlab R2010b and it wanted a 64-bit binary. Recompiled it with a "mex priority.cpp" and all was working.
Side note: it is now "mex -setup", not "mex setup" as is says in your readme. Also, do you want the priority.mexw64 binary so you can include it with the distribution? Happy to share it.
Works for me on Windows 7 - what's the problem?
Perhaps you need to be an Administrator to change process priorities? Can you change the priority using Task Manager?
Any ideas on how to get this working on Windows 7?
Works when I use your .dll, but I can't get the .c code to compile. I was hoping to alter your .c code to get maximum priority.
Been using this for 9 years every day as part of my startup script so that long-running MATLAB programs don't hog my computer. Thanks!
Good, but doesnt work on mine. I just cant set to above normal... win98 matlabR12.
good work! very useful!
Nice! Confirmed to work on win2k SP3.
Added source code, and binary for R2007b (latter uses .NET).
2008-09-19 V2 removed restriction on "h" (high) priority as requested
whoops - editor, please use this file, not the one i sent five mins ago :)
Updated to provide self-compile for platforms for which binaries are not supplied.
Added self-compile option.