Hello Sander, <div><br></div><div>Elli's suggestion is right. As you apparently want to do that on matlab startup and using Linux, you can add a matlab shortcut  on your panel with the following instructions : matlab -r "yourinstructions"</div>
<div>"yourinstructions" can be an addpath or wathever you want.</div><div>I often use this initialization to avoid default path conflicts between spm, fieldtrip, eeglab, etc...</div><div><br></div><div>Hope this helps, </div>
<div><br></div><div>Rodolphe<br><br><div class="gmail_quote">On Wed, May 25, 2011 at 7:53 AM, Kanal Eliezer <span dir="ltr"><<a href="mailto:ekanal@cmu.edu">ekanal@cmu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Sander -<br>
<br>
Just so you know, there is a way to recursively add folders to a path, using the `genpath` command:<br>
<br>
addpath(genpath(path/to/folder))<br>
<br>
However, as you said, it's probably just a better idea to add it to the `ft_defaults` file so it's added automatically, as you suggested.<br>
<br>
Elli<br>
<div><div></div><div class="h5"><br>
<br>
On May 25, 2011, at 6:13 AM, Sander Maijers wrote:<br>
<br>
> Dear readers,<br>
><br>
> While all other functional subdirectories do get included after an<br>
> "addpath" of the FieldTrip root directory, the "multivariate"<br>
> subdirectories does not get included.<br>
><br>
> It assume this is because of automatical detection that requirements of<br>
> the FieldTrip multivariate module were not met.<br>
><br>
> Yet while some parts of the multivariate module seem to rely on<br>
> features exclusive to MATLAB 64-bit editions, others (like the ridge<br>
> regression functionality) do not.<br>
><br>
>> From my (tentative) investigation it appears that there is no standard<br>
> way to add a path recursively from a startup.m file, even though that<br>
> can be done with the graphical interface of MATLAB.<br>
><br>
> What are your thoughts about this?<br>
><br>
> Can anyone offer a method to automatically add FieldTrip including the<br>
> multivariate module to the path upon startup of MATLAB that works in<br>
> my situation?<br>
><br>
> Kind regards,<br>
> Sander Maijers<br>
><br>
> P.S.:<br>
> In case it would be relevant: I use MATLAB R2011a 32-bit under 64-bit<br>
> Linux.<br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote></div><br></div>