Matlab
Version:
8.3 (R2014a)
Architectures:
x86_64
(support for i386 ends with R2012a)
Invocation:
From the command line:
| matlab | graphical interface |
| matlab -nodesktop -nosplash | text mode, with graphics window |
| matlab -nodisplay | text mode, without graphics |
(if /usr/global/matlab/bin is in PATH).
KDE: in submenu "Science and Math"
Matlab icon in the kicker
License:
floating
server: liz.cms.hu-berlin.de
Startup
User settings are stored in
$HOME/.matlab/R2014a/
Startup script:
$HOME/matlab/startup.m
Help and trouble shooting
| matlab -h | list command line options |
| matlab -n | show startup environment |
Running Matlab from scripts
In order to run Matlab code from a script, prepare a file with extension .m and run it with the switch "-r".
Examples:
matlab -r myscript # run myscript.m
matlab -r "myfct(2,3)" # run myfct.m with arguments
In non-interactive mode (e.g. from a batch script), you may have to extend PATH and set MATLABPATH first. In addition, the graphical interface and plot window are to be suppressed.
Example:
PATH=/usr/global/matlab/bin:$PATH
MATLABPATH=$HOME/my_matlab_dir
export MATLABPATH
matlab -nodisplay -r "myscript, quit" # run myscript.m and quit
The trailing "quit" makes sure that Matlab is terminated, even if this was omitted from the script.
Plots are generated as usual, but will not be displayed. The most recent one can be stored as a file by a Matlab statement like
saveas(gcf,'filename.ext') % format according to extension
saveas(gcf,'filename.eps','psc2') % EPS with color
Valid extensions are .fig (Matlab's format), .eps, .jpg, .png and others (but no PDF).
Bugs
-
Matlab 7.6 and higher requires a processor with SSE2 support.
Fix: fall back to Matlab 7.5 on machines without SSE2.
letzte Änderung: B. Bunk 30.06.2015