Code covered by the BSD License  

Highlights from
priority

4.8

4.8 | 5 ratings Rate this file 14 Downloads (last 30 days) File Size: 2.88 KB File ID: #1841

priority

by

 

15 Jun 2002 (Updated )

Change the priority of the MATLAB Process programatically.

| Watch this File

File Information
Description

**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
<do processing>
priority(pri) % set it back

MATLAB release MATLAB 7.5 (R2007b)
Other requirements Win95 or WinNT 3.1 or greater. More options work with Win2000 or later.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
24 Nov 2010 Steve Hoelzer

I've been using this for many years. It's a great little tool!

22 Nov 2010 Ben Mitch

No, they don't. I've uploaded just source, then. Thanks anyway

22 Nov 2010 Ben Mitch

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.

Cheers

22 Nov 2010 Alan

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.

20 Nov 2010 Ben Mitch

Hi Alan

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?

01 Nov 2010 Alan

Any ideas on how to get this working on Windows 7?

26 Jul 2009 Ian Nauhaus

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.

08 Jun 2009 Alan

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!

14 Feb 2006 Cleber Inacio

Good, but doesnt work on mine. I just cant set to above normal... win98 matlabR12.

14 Jul 2005 E Lehmann

good work! very useful!

26 Jun 2005 Y Mehta

Thanks,

It works

31 Jan 2003 Ed Wilson

Nice! Confirmed to work on win2k SP3.

Updates
07 Apr 2009

Added source code, and binary for R2007b (latter uses .NET).

18 Sep 2009

2008-09-19 V2 removed restriction on "h" (high) priority as requested

18 Sep 2009

whoops - editor, please use this file, not the one i sent five mins ago :)

22 Nov 2010

Updated to provide self-compile for platforms for which binaries are not supplied.

22 Nov 2010

Added self-compile option.

Contact us