SPM/Octave

< SPM

GNU Octave

GNU Octave is a high-level language that is mostly compatible with MATLAB. It is free open source software under the terms of the GNU General Public License.

Octave

MATLAB/Octave compatibility

GNU Octave is mostly compatible with MATLAB:

Compatibility status from other neuroimaging MATLAB packages:

Current status for SPM/Octave compatibility

SPM is not supported under Octave and there is a number of known limitations (especially regarding the batch system) but feel free to contact fil.spm@ucl.ac.uk if you are interested. In most situations, the standalone version of SPM might be a sufficient alternative.

You need to use latest version of SPM12 and GNU Octave (4.2).

For compilation of the MEX files for Octave, run the following:


cd /home/login/spm12/src
make distclean PLATFORM=octave
make PLATFORM=octave && make install PLATFORM=octave

How to contribute

You can contribute to improve the support of SPM on GNU Octave in several ways:

Compatibility issues observed so far in SPM with Octave

Requires changes in SPM

Requires changes in Octave

Undecided yet

  • mkoctfile's option to define output file name is "-o" or "--output" while mex's option is "-output". If used, no file extension ('.mex') is appended.
  • MEX object files "*.o" are not automatically deleted after compilation (they are with MATLAB's mex).
  • computer.m returns different strings than on MATLAB (PCWIN, GLNX86, PCWIN64, GLNXA64, MACI64), e.g. x86_64-unknown-linux-gnu.
  • load.m and save.m automatically add a .mat file extension if not provided with MATLAB (Octave doesn't).
  • Octave buffers output, which can be blocking. fflush(stdout) or page_screen_output has to be used.

Miscellaneous

  • exist('OCTAVE_VERSION','builtin') can be used to detect if running in Octave or MATLAB.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.