Hi David,
try this:
u = kron(kron(ones(1,10),[0 1]),ones(1,20));
xBF = spm_get_bf(struct('dt',1,'name','hrf'));
x = spm_Volterra(struct('u',u','name',{{'task'}}),xBF.bf);
figure,plot(u);hold on;plot(x);
Here, spm_Volterra is really just a call to MATLAB's conv function.
Best regards,
Guillaume.
On 25/11/14 09:42, David Hofmann wrote:
> Hi Guillaume,
>
> thanks for the info. Can you maybe give a short example of how to
> convolve e.g. a stimulus 0/1-timeseries by using this function? That
> would be helpful.
>
> greetings
>
> David
>
> 2014-11-22 11:51 GMT+01:00 Flandin, Guillaume <[log in to unmask]
> <mailto:[log in to unmask]>>:
>
> Hi David,
>
>
> convolution takes place in spm_Volterra.m called from
> spm_fMRI_design.m (the HRF is created in spm_get_bf.m).
>
>
> Best regards,
>
> Guillaume.
>
>
> ------------------------------------------------------------------------
> *From:* SPM (Statistical Parametric Mapping) <[log in to unmask]
> <mailto:[log in to unmask]>> on behalf of David Hofmann
> <[log in to unmask] <mailto:[log in to unmask]>>
> *Sent:* 21 November 2014 23:30
> *To:* [log in to unmask] <mailto:[log in to unmask]>
> *Subject:* [SPM] Convolution of design matrix with HRF - spm function?
>
> Hi @all,
>
> where can I find the function which convoles the design matrix with
> a HRF in spm?
>
>
> Thanks in advance
>
> David
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|