Yes it is possible. The website indicates the following for Windows and Unix:
To run MATLAB in the background, you need to do the following:
1. redirect the standard input
2. redirect the standard output
3. eliminate the graphical output
4. call MATLAB as a background process
You may also want to change the process's priority to decrease its effect on total CPU usage.
Here is a simple script written for the UNIX C shell, which demonstrates one way of running MATLAB in the background:
#!/bin/csh -f
# Clear the DISPLAY.
unsetenv DISPLAY # unset DISPLAY for some shells
# Call MATLAB with the appropriate input and output,
# make it immune to hangups and quits using ''nohup'',
# and run it in the background.
nohup matlab < $1 > $2 &
Save this script in a file called matbg and change its permissions to make it executable. The syntax for calling it is:
If you are not interested in saving the output, you can specify /dev/null as the second argument. If you want to change the process's priority, you can use the UNIX command nice in the line, which invokes MATLAB. For example, if you wish to change MATLAB's priority to 10, change the appropriate line to the following
Please suggest an improvement
(login needed, link opens in new window)
Your views are welcome and will help other readers of this page.