Hello,

I'm trying to run LGI.  We have the 2012 version of matlab and the image processing toolbox.  I've looked at several threads dealing with path issues, but have been unable to fix my problem.

I think our problem is that when I run "recon-all -s ucr001_4-11 -localGI" it seems to start up properly, but then it's calling Matlab 2010 instead of 2012.  

Here's the error message we get:
======================================================
Warning: Unable to open display 'iconic'.  You will not be able to display graphics on the screen.

                            < M A T L A B (R) >
                  Copyright 1984-2010 The MathWorks, Inc.
                Version 7.10.0.499 (R2010a) 64-bit (maci64)
                              February 5, 2010

 
  To get started, type one of these: helpwin, helpdesk, or demo.
  For product information, visit www.mathworks.com.
 
>> ??? Undefined function or method 'make_outer_surface' for input arguments of
type 'char'.
 
>> 
ERROR: make_outer_surface did not create output file '/Users/Tiana/ucr_freesurfer_data/subjects_10/ucr001_4-11/surf/tmp-mris_compute_lgi-lh.pial/lh.pial-outer'!
Darwin bryden.ucr.edu 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
======================================================


Then I moved Matlab2010 to see if it would load Matlab2012 and I got this error:
======================================================
bryden:~ Tiana$ recon-all -s ucr001_4-11 -localGI
Subject Stamp: freesurfer-Darwin-leopard-i686-stable-pub-v5.0.0
Current Stamp: freesurfer-Darwin-leopard-i686-stable-pub-v5.0.0
INFO: SUBJECTS_DIR is /Users/Tiana/ucr_freesurfer_data/subjects_10
Actual FREESURFER_HOME /Applications/freesurfer
-rw-r--r--  1 Tiana  staff  1839026 Feb 27 10:34 /Users/Tiana/ucr_freesurfer_data/subjects_10/ucr001_4-11/scripts/recon-all.log
Darwin bryden.ucr.edu 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
/Users/Tiana/ucr_freesurfer_data/subjects_10/ucr001_4-11/surf
#--------------------------------------------
#@# Local Gyrification Index lh Wed Feb 27 10:41:59 PST 2013
\n mris_compute_lgi --i lh.pial \n
ERROR: Matlab is required to run mris_compute_lgi!
Darwin bryden.ucr.edu 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

recon-all -s ucr001_4-11 exited with ERRORS at Wed Feb 27 10:41:59 PST 2013
======================================================

 
I have been unable to find out how to have FreeSurfer call Matlab 2012.  My startup.h file looks like this now:
%------------ FreeSurfer -----------------------------%
fshome = getenv('FREESURFER_HOME');
$FREESURFER_HOME/matlab;
fsmatlab = sprintf('/Users/Tiana/matlab',fshome);
    path(path,fsmatlab);
clear fshome fsmatlab;
%-----------------------------------------------------%

I used the full code for startup.m given by Nick and others but then Matlab2012 didn't open up properly; with this code Matlab2012 opens up without errors.

Is there a place in Freesurfer to define the path for Matlab?


Any help would be greatly appreciated.


Thank you,



Adam