Matlab Runtime

The brainstem and hippocampal subfield modules in FreeSurfer 6.0 require the Matlab R2012 runtime. This runtime is free, and therefore NO MATLAB LICENSES ARE REQUIRED TO USE THESE PACKAGES.

The runtime is installed as follows (note that some commands might require root permissions, if FreeSurfer 6.0 is installed in a system directory such as /usr/local/):

setenv FREESURFER_HOME /usr/local/freesurfer 

Or, in bash:

export FREESURFER_HOME=/usr/local/freesurfer

cd $FREESURFER_HOME

In linux:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "runtime2012b.tar.gz"

In MAC:

curl "https://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bMAC.tar.gz" -o "runtime2012b.tar.gz"

tar xvf runtime2012b.tar.gz

You are now done! The brainstem and/or hippocampal subfield modules should now work fine. If that is the case, you can delete the packed runtime file with:

rm $FREESURFER_HOME/runtime2012b.tar.gz

Frequently asked questions (FAQ)

If you already have Matlab 2012b installed on your system, there is no need to dowload the runtime. Note that it has to be this specific version of Matlab; if it is not 2012b, you need to download the runtime as described above. If it is indeed 2012b, all you need to do is to create a symbolic link named MCVv80 in your FreeSurfer directory that points to the main Matlab directory.

First, we will define the environment variable FREESURFER_HOME. In tcsh or csh:

setenv FREESURFER_HOME /usr/local/freesurfer 

Or, in bash:

export FREESURFER_HOME=/usr/local/freesurfer

Second, change directory to your FreeSurfer 6.0 directory:

cd $FREESURFER_HOME

Finally, create the symbolic link:

ln -s <MatlabRootDirectory> ./MCRv80

where the matlab root directory can be easily obtained by executing the command "matlabroot" in Matlab R2012b. It typically looks like "/Applications/MATLAB_R2012b.app/" in MAC, and "/usr/local/matlab/8.0" in Linux.