Hi Felix,

 

It appears that the script is unable to locate "/Volumes/465GB/Felix/#Stroop/First_StroopHester.mat". Perhaps that directory no longer exists. I would check to 1) make sure the directory sti exists and 2) that the directory contains the the .mat file.

 

Cheers,

 

- Jordan

------ Original message ------
From: Grubbe, Felix<[log in to unmask]>
Date: 10/6/2013 11:37 AM
To: [log in to unmask];
Subject:[SPM] Help with a Script

<[log in to unmask]>
Hello,

I am trying to use a First-Level-Script which I used some time ago and which worked fine. Now it produces me an error message. I didn't write it and i'm not very skilled with all the comands, but maybe someone else can see the error in it? 


basicdir = '/Volumes/465GB/Felix/#Stroop';

subjectdirs = {'SP004_ED'};

jobs = cell(1,numel(subjectdirs));
ncells = 4;
input_arg = cell(ncells,numel(subjectdirs));

for cellsubject = 1:numel(subjectdirs)

    input_arg{1,cellsubject} = cellstr(fullfile(basicdir,'First_Level',subjectdirs{cellsubject}));
    
    input_arg{2,cellsubject} = cellstr(spm_select('FPlist',fullfile(basicdir,subjectdirs{cellsubject}),'^.*img'));
    input_arg{3,cellsubject} = cellstr(spm_select('FPlist',fullfile(basicdir,'First_Level', subjectdirs{cellsubject}),'.mat'));   
    input_arg{4,cellsubject} = cellstr(spm_select('FPlist',fullfile(basicdir,subjectdirs{cellsubject}),'^rp.*txt'));
   
    jobs{cellsubject} = '/Volumes/465GB/Felix/#Stroop/First_StroopHester.mat';
end

spm_jobman('serial',jobs,'',input_arg{:});



And the error message is:


Error in ==> First_StroopHester_script at 20
spm_jobman('serial',jobs,'',input_arg{:});
Warning: Load failed: '/Volumes/465GB/Felix/#Stroop/First_StroopHester.mat'
> In spm_jobman>load_jobs at 398
  In spm_jobman at 131
  In First_StroopHester_script at 20
??? Error using ==> cfg_util at 657
No valid job.

Error in ==> spm_jobman at 197


Thank you very much for your help!

Kind regards, 

Felix