This is exactly what you want. The syntax used to access the data is y = D(channels, samples, trials)
C = D.meegchannels
t1 = 0; % sec
t2 = 0.1; % sec
y = mean(D(C(1),D.indsample(t1):D.indsample(t2),1),2)
is the mean amplitude for channel 1, trial 1, over the specified time window and
y = mean(D(D.meegchannels, D.indsample(t1):D.indsample(t2),1),2)
is the mean for every channel
Hope this helps!
[log in to unmask]<mailto:[log in to unmask]>
On Jul 21, 2011, at 1:36 PM, DANAY DIMA wrote:
I am sorry but I think I did not explain really well what I meant.
I am interested in getting for a time window (0-100ms) for across the scalp (but also the possibility to take one channel only) the mean amplitude (across the time window specified) for every subject.
I tried the command lines below but I am not really clear what the mean. Where do I specify the channels? Or does it use the whole scalp? Where are the mean amplitudes for every subject stored?
Thanks so much for all your help.
> Date: Wed, 20 Jul 2011 17:40:43 +0100
> From: [log in to unmask]<mailto:[log in to unmask]>
> Subject: Re: [SPM] MEG/EEG how to get mean amplitudes
> To: [log in to unmask]<mailto:[log in to unmask]>
> Dear Danai,
> If you are talking about scalp-level stats you can average scalp x
> time image using the 'Specifty 1st level' button to get a single scalp
> map and then do stats of that. If you just want to get the values you
> can do something like:
> D = spm_eeg_load
> t1 = 0.1; %sec
> t2 = 0.2;
> trialind = 1;
> dat = squeeze(mean(D(D.meegchannels, D.indsample(t1):D.indsample(t2),
> trialind), 2));
> 2011/7/20 DANAY DIMA <[log in to unmask]<mailto:[log in to unmask]>>:
> > Dear All,
> > I have a question concerning basic MEG/EEG analysis.
> > Do you know how to get mean amplitudes of an ERP for a time window (e.g
> > 0-100ms) for multiple channels (eg, CPz and CP3 and CP4)?
> > Thanks so much for your help
> > Best wishes,
> > Danai