Problems installing REST in Matlab

 Hello,
I installed REST in Matlab 2013A just adding the path with the function SetPath
but then when I try to run  >rest
I got the following error:

Error using cd
Cannot CD to C:\Users\Carlos\AppData\Local\Temp (Name is nonexistent or not a directory).
Error in tempdir (line 31)
    curr_dir = cd(tmp_dir);
 
Error in rest_misc (line 119)
dirFCTemp =dir(fullfile(tempdir, 'fc_*'));
 
Error in rest>QuitAll (line 402)
rest_misc( 'ClearTempFiles');
Error in rest (line 34)
QuitAll;

Any idea why it is nor working, I have tried several versions of rest, it seems it is more a problem of Matlab and some general settings

I would appreciate your help
 

 

 you may need to restore the default path of matlab first by typing      

restoredefaultpath;

Then I recommand you manually add REST path. 

in matlab manu, File --> setpath
just add folder of REST (not with the subfolders of it) and add both folder and subfolders of SPM8.

Then save.

If you still met error, I think its a problem of your matlab setup.


 Thank you for the answer.

I tried that and still dont work.

Probably it could be some problem with the paths and directories?

I installed matlab in directory C:\ ... and the  REST & SPM8 in F:\ directory
maybe I should install them in the same directory?

JC

 its not necessary to have REST and matlab in the same directory. 

you can try type:

tempdir

in your matlab, to see if it can correctly locate your system directory where temporary files stores.

in my computer, it will return:

C:\Users\sony\AppData\Local\Temp\
I am afraid your system is not correctly installed or you have changed your temp directory in your system. 

In this case, you can open the rest_misc.m file, comment lines 115-131 (add % before those lines, or select those lines and press ctrl+R).