How to install MARSBAR toolbox in SPM12? I am trying to install MARSBAR toolbox into SPM12, but I am running into different problems. Initially they were all related to directory ownership and permissions (using Ubuntu 14.04), which I managed to correct, but then matlab wouldn't find the script files (extension .m). I added them manually to the path, and that worked out.

Finally, and here is the point I can't go through, when I run marsbar in MATLAB I keep running into:

&gt;&gt; marsbar
MarsBaR analysis functions prepended to path
Undefined function or variable 'marmoire'.

Error in marsbar (line 125)
  o = marmoire;

Error in marsbar (line 57)
marsbar('on');


Even though the function marmoire that it is complaining about IS on the path and with proper permissions! &lt;- Actually not, see below.

Googling the error took me to a lot of different complaints from users that had difficulties about running it on SPM12 1 2, however none were quite the same as the problem I've been facing.

Also, the documentation for the toolbox is quite outdated now, it seems.

Any light here would be greatly appreciated!

UPDATE 6.1.16
As per suggestion in the comments I added two lines before marsbar calls marmoire.



Now the error is:

&gt;&gt; marsbar
MarsBaR analysis functions prepended to path
Undefined function or variable 'marmoire'.

Error in marsbar (line 125)
  which marmoire

Error in marsbar (line 57)
marsbar('on');


Which means that marmoire is not actually in the proper path, however I copied it to the same directory as marsbar:



And the problem persists.
Thanks for the comments, @serk1. The answer to this question is that that is a bug, it seems.

I gave up editing the scripts myself and decided to reinstall Matlab and Marsbar, and it properly recognized the path and the permission for the files after that. 

I will leave the question here, in case someone run into similar problems.