Nifti format as input: Error- tried on demodata as well-Please help

Hello Guys,

I was trying to run the data that I have in Nifti format, but it kept giving me error
 
So, I wanted to try with "Demo-data" provided on the website http://rfmri.org/DemoData to test if there is any issue with the data I have.
 
I wanted to try only with one subject, so I made a new folder with "FunRaw" and "T1Raw" folders, I converted from dicom to nifti using SPM 12 for "Sub_001" with only 20 nifti volumes in "FunRaw" and 1 nifti in "T1Raw" for "Sub_001" from the demo data 
 
After running it gave the same error, as it gave when I ran the data I had initially.
 
The error is as follows:
 
Undefined function 'file2mat' for input arguments of type 'struct'.
 
Error in file_array/subsref>subfun (line 80)
t = file2mat(sobj,varargin{:});
 
Error in file_array/subsref (line 60)
    t = subfun(sobj,args{:});
 
Error in nifti/subsref>rec (line 219)
            t = subsref(t,subs(2:end));
 
Error in nifti/subsref (line 45)
varargout = rec(opt,subs);
 
Error in y_Read (line 68)
    Data = squeeze(double(Nii.dat(:,:,:,VolumeIndex)));
 
Error in y_FD_Jenkinson (line 31)
[RefData, RefHead] = y_Read(ReferenceImage,1);
 
Error in DPARSFA_run (line 892)
            FD_Jenkinson = y_FD_Jenkinson(rpname.name,RefFile);
 
Error in DPARSFA>pushbuttonRun_Callback (line 1786)
    [Error]=DPARSFA_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSFA (line 30)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating UIControl Callback
 
 
Can you please help me with this? I am having trouble understanding what this error means, and what can i do to solve it? 
 
Thank you. 
 

 

There is a conflict between REST's subfolders and SPM8.

Please remove REST's subdirectory in Matlab PATH.

Thank you for the Reply. I appreciate.

I removed "Rest" from the path now the Path only have "Dpabi" and "SPM". But now it gives different error after running as follows:

Done    'Realign: Estimate & Reslice'
Done
 
Moving Head Motion Corrected Files:Sub_001 OK
Error using cd
Cannot CD to E:\datasub2nifti\T1Img\Sub_001 (Name is nonexistent or not a directory).
 
Error in DPARSFA_run (line 1853)
            cd([AutoDataProcessParameter.DataProcessDir,filesep,'T1Img',filesep,AutoDataProcessParameter.SubjectID{1}]);
 
Error in DPARSFA>pushbuttonRun_Callback (line 1786)
    [Error]=DPARSFA_run(handles.Cfg);
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPARSFA (line 30)
    gui_mainfcn(gui_State, varargin{:});
 
Error while evaluating UIControl Callback
 
I dont understand why it is giving this error. Can you help me with this please?
 
Thank you. 

 

Make sure you've put the T1 NifTI files under "T1Img".