You have to create the file yourself in the matlab folder if it doesn't already exist.

Duncan
On 12 Oct 2007, at 21:44, Ted Yanagihara wrote:

Hi Duncan,

I actually was unable to find the startup.m file (not just in the matlab folder, but anywhere on my computer), so I did not set the environment variables up. Rather that waste people's time with it, I'm going to just hope that the workaround keeps things swept under the rug.

I really appreciate the attention you've given my issue, thanks again!

ted


On 10/12/07, Duncan Mortimer < [log in to unmask]> wrote:
The solution to using the Matlab libraries on Mac OS X under bash is
documented on the Mac install page on our site - did this not work?
(you have to edit your startup.m file)

I don't want to have to force tcsh on you :-)

Duncan


On 12 Oct 2007, at 16:37, Ted Yanagihara wrote:

> Hi Duncan and the list,
>
> Our systems administrator has found a solution, or perhaps a
> workaround, to the problem. I am using mac OSX that runs bash as
> the default. He changed this default in Netinfo Manager so that I
> startup in tcsh, then added the necessary information to keep
> running fsl commands from my bash profile into the tcsh file. Now
> when I check the environment that Matlab is running in using the
> command you suggested, getenv('FSLDIR'), it returns the appropriate
> "/usr/local/fsl" that I was looking for.
>
> I hope this helps anyone else who may run into this problem. I know
> of at least one other person who has struggled with this on a
> different system.
>
> thanks for your help,
>
> ted
>
> On 10/12/07, Duncan Mortimer < [log in to unmask]> wrote:
> What OS are you using?
> The problem is that the environment variable FSLDIR isn't being set
> in the Matlab shell.
> BASH is the recommended shell, and isn't the problem. Could you
> issue the following in a fresh BASH shell:
>
> echo $FSLDIR
>
> If this doesn't print out the location of your FSL installation
> then this is the problem, and you need to go and check the install
> documentation for setting up this variable.
>
> If it returns the expected directory, launch Matlab and check that
> the FSLDIR environment variable is still set:
>
> fsldir=getenv('FSLDIR')
>
> Duncan
>
> On 11 Oct 2007, at 16:39, Ted Yanagihara wrote:
>
>> Hello list,
>>
>> I am trying to read some of my images from FEAT and probtrackx in
>> matlab. I have been getting an error when using read_avw and
>> read_avw_complex, but the other commands (such as read_avw_hdr)
>> work fine.
>>
>> After looking at the scripts for these functions, it appears that
>> matlab cannot find the path for fsl.sh because it wants to use the
>> script says to use this path: ${FSLDIR}/etc/fslconf/fsl.sh   but
>> matlab reads this as: /etc/fslconf/fsl.sh
>>
>> Is this problem because matlab is running from bash as its default
>> when I need it to run in tcsh? If so, does anyone know how I can
>> make my default environment tcsh? If not, what else might be going
>> on?
>>
>>
>> Here is the full error that matlab gives me when I run this set of
>> commands:
>>
>> >> dir='~/Lab/Data/AKL_13/dti_FA';
>> >> fid=fopen(dir);
>> >> image=read_avw(fid)
>> Warning: The argument for the %s format specifier must be of type
>> char (a string).
>> > In read_avw at 30
>> sh: line 1: /etc/fslconf/fsl.sh: No such file or directory
>> ??? Error using ==> fread
>> Invalid file identifier.  Use fopen to generate a valid file
>> identifier.
>>
>> Error in ==> read_avw_hdr at 17
>> testval = fread(fid,1,'int32');
>>
>> Error in ==> read_avw at 33
>>   [dims,scales,bpp,endian,datatype]= read_avw_hdr(tmpname);
>
>
> WWW: http://www.fmrib.ox.ac.uk/~duncan    email: [log in to unmask]
>
>
>
>

--
Duncan A B Mortimer DPhil MChem
                 Computing Officer, FMRIB Centre, University of Oxford,
               John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK.
Tel: (0)1865 222713
WWW: http://www.fmrib.ox.ac.uk/~duncan    email: [log in to unmask]