[Eeglablist] topomap back view
Niko Busch
mail at nikobusch.net
Sun Aug 28 09:46:28 PDT 2011
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20110828/831cdc19/attachment.html>
-------------- next part --------------
Hi Bjoern,
I am not sure what you mean by 'back/front'. If you want a simple 2D topoplot, this is how I do it. I assume that you have already loaded your two conditions in the eeglab GUI. Alternatively, replace 'ALLEEG' with the names of the variables holding your two EEG sets. The code is a bit verbose for the sake of clarity. Of course, the code could be more compact.
Cheers,
Niko
PS: I sent this message to your email addresses before, but the emails bounced back.
%-------------------------------------
% Average over a time window, specified in SECONDs. Convert the time to
% sampling points.
win_start = 0.100;
win_end = 0.300;
tlim = round(eeg_lat2point( [win_start win_end], 1, ALLEEG(1).srate, [ALLEEG(1).xmin ALLEEG(1).xmax]));
% Average data over trials, then subtract the two conditions to get the
% effect. Finally, average the effect over your time window of interest.
data1 = mean(ALLEEG(1).data,3);
data2 = mean(ALLEEG(2).data,3);
effect = data2 - data1;
winmean = mean(effect(:,tlim(1):tlim(2)),2);
% Plot the figure. Modify the topoplot options as you see fit.
figure;
topoplot(winmean, ALLEEG(1).chanlocs);
%-------------------------------------
More information about the eeglablist
mailing list