Hi Feng,
you are absolutely right. spm_select is wrapping the call to
cfg_getfile to expand the image frames of 4D NIFTI files. The following
should do a better job:
funFiles{i} =
cellstr{spm_select('ExtFPList',fullfile(dataDir,subj,runList{i}),'^.*\.
nii$', Inf)};
Volkmar
Am Mittwoch, den 16.01.2019, 11:36 +0100 schrieb Carrie Lin:
> Dear Volkmar,
>
> Thanks for your help! However, I tried your method but still get
> errors. Is this sentence correct?
>
> funFiles{i} =
> spm_select('ExtFPList',fullfile(dataDir,subj,runList{i}),'^.*\.nii$',
> Inf);
> —>
> funFiles{i} =
> cfg_getfile('ExtFPList',fullfile(dataDir,subj,runList{i}),'^.*\.nii$'
> , Inf);
>
> Matlab said “inappropriate usage"
>
>
> Do you know what other methods I could use or how to revise this?
>
>
>
> I just started Matlab learning myself, sorry for simple questions!
>
>
> Thanks in advance!
> Feng
>
>
> > 在 2019年1月16日,09:46,Volkmar Glauche <volkmar.glauche@UNIKLINIK-FREIB
> > URG.DE> 写道:
> >
> > Dear Feng,
> >
> > your file list must be a cell array, where each array element
> > (session) consists of a cellstr list of file names. It looks like
> > you are creating a cellstr list of filenames instead. Instead of
> > doing the cellstr() conversion yourself, you could replace the call
> > to spm_select with a call to cfg_getfile. It has the same list
> > syntax, but returns a cellstr list of filenames straight away. Your
> > funFiles variable should then have the correct structure that is
> > required to fill the batch template.
> >
> > Hope this helps
> > Volkmar
>
>
|