Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Matlab focus stealing, without modifying Matlab script

Tags:

matlab

I hava Matlab script running in the background. It keeps popping up pogress bar windows as the computation progresses. This is very annoying.

Problem is I did not write the Matlab script myself, and it is a very long and complicated piece of code that I don't want to mess with. So how can I prevent Matlab from stealing focus, without modifying the Matlab script? Hopefully some Matlab setting will let me do this, without modifying the script itself.

In case it matters, my PC is running Xubuntu.

like image 381
becko Avatar asked May 17 '14 14:05

becko


1 Answers

Some ideas to avoid figures:

Open a single worker (requires parallel computing) and run your script on it. Workers automatically don't have a GUI

matlabpool 1
warning('off','MATLAB:Completion:AllInputsExcluded') %turn off warning
spmd, yourfunction, end

Use the matlab startup parameters to disable figures

matlab -noFigureWindows

or start matlab as a command line tool, running your function, saving the workspace and exiting.

matlab -nodisplay -nosplash -r "yourfunction;save('result.mat');exit"
like image 85
Daniel Avatar answered Nov 07 '22 18:11

Daniel