Sorry;
The last response wasn't quite accurate - but following, at least, worked:
Directory1 = '/wiesel/data7/motionstudy/s03/run1';
Directory2 = '/wiesel/data7/motionstudy/s03/run2';
Filter = 'sn*.img';
SPM.xY.P = [spm_get('files',Directory1,Filter);spm_get
('files',Directory2,Filter)];
Jen
Quoting Karl Friston <[log in to unmask]>:
> Dear Jen,
>
> I think you would simply concatentate the filenames in a loop.
> i.e.
>
> Directory{1) = '/home/karl/SPM/subject1';
> Directory{2) = '/home/karl/SPM/subject2';
> Directory{3) = '/home/karl/SPM/subject3';
>
> Filter = 'sn*.img';
> for i = 1:length(Directory{1))
> SPM.xY.P = strvcat(SPM.xY.P,spm_get('files',Directory{i},Filter));
> end
>
> I have not tested this but I hope it works - Karl
>
>
> At 04:03 19/12/2002 +0000, Jen Whitman wrote:
> >Ok, I tried many variations on my own, but I'm stuck:
> >
> >The template batch script provided for spm2b shows how to specify the
> >matrix of filenames for one session;
> >
> >Directory = '/home/karl/SPM/attention/Karen';
> >Filter = 'sn*.img';
> >SPM.xY.P = spm_get('files',Directory,Filter);
> >
> >- but what is the proper syntax for specifying different directories for
> >multiple sessions?
> >
> >Jen Whitman
> >
> >
>
>
|