Skip to end of metadata
Go to start of metadata

To run FSL commands in Matlab you need to start Matlab like this:
LD_PRELOAD=/usr/lib64/ <path to Matlab>/matlab

For example:
LD_PRELOAD=/usr/lib64/ /usr/local/Matlab/bin/matlab

Next, within Matlab you need to set up some variables:
fsl_path = '/usr/share/fsl/4.1/';
curpath = getenv('PATH');

Then you call FSL routines like this:
system('sh -c ". ${FSLDIR}etc/fslconf/;${FSLDIR}bin/<FSL command>"')

For example:
system('sh -c ". ${FSLDIR}etc/fslconf/;${FSLDIR}bin/fast -b --nopve mean_func"') 



  • No labels

1 Comment

  1. Recent versions of fsl include a /usr/local/etc/matlab folder - and in that folder, there is a call_fsl.m command. Copy/edit that as described inside that file, and enjoy....