Robert,

When freesurfer is first started after installation, it adds some lines
to your ~/matlab/startup.m file to add the freesurfer matlab files to
the matlab paths.  But the way those lines are written now, it assumes
that the FREESURFER_HOME environment variable is always set, and doesnt
check if it isn't (which would be that case if using matlab without
having started the Freesurfer setup).

So, please change your ~/matlab/startup.m file to look like this:

%------------ FreeSurfer -----------------------------%
fshome = getenv('FREESURFER_HOME');
fsmatlab = sprintf('%s/matlab',fshome);
if (exist(fsmatlab) == 7)
  path(path,fsmatlab);
end
clear fshome fsmatlab;
%-----------------------------------------------------%

%------------ FreeSurfer FAST ------------------------%
fsfasthome = getenv('FSFAST_HOME');
fsfasttoolbox = sprintf('%s/toolbox',fsfasthome);
if (exist(fsfasttoolbox) == 7)
  path(path,fsfasttoolbox);
end
clear fsfasthome fsfasttoolbox;
%-----------------------------------------------------%


The new lines are the 'if' statements which check for the existence of
the directories before attempting to add to the path, which is the
proper thing to do (and future Freesurfer distributions will contain
this fixup).

Nick

On Sat, 2007-05-05 at 08:00 -0600, Robert Baldwin wrote: 
> Hello-
> I am new to Freesurfer and Matlab.
> I have Matlab 7.4.0 installed on an Intel Mac.
> I just installed Freesurfer.
> Now when I start Matlab I get the following warnings:
> 
> Warning: Name is nonexistent or not a directory: /matlab.
>  In path at 110
>  In startup at 4
>  In matlabrc at 255
> Warning: Name is non existent or not a directory: /toolbox.
>  In path at 110
>  In startup at 11
>  In Matlabrc at 255
> 
> I have tried adding the freesurfer folder to these files to the path for
> matlab, but the error still occurs. Any suggestions on how to get this error
> to quit?
> 
> Thanks!
> -Robert
> 
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
> 
> 

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to