[Eeglablist] importing ERPs
Stephen Politzer-Ahles
politzerahless at gmail.com
Tue Sep 4 14:23:04 PDT 2012
Hi Josh,
While there's no way to do difference topoplots from the user interface (as
far as I know), the input to topoplot() is just a vector of amplitudes (1
measurement for each channel), and thus it can be done straightforwardly
from the command line. If you have your two conditions (could be
single-subject or grand average data), and put the data from each one into
a variable, like
condition1 = EEG.data;
...
condition2 = EEG.data;
Then you can subtract them:
diff = condition1-condition2;
And get a mean over some particular time window:
mean_to_plot = mean(diff(:,starttime:endtime),2);
Then you can feed "mean_to_plot" to topoplot(), along with whatever other
parameters you want.
The details will of course vary depending on the format of your data, how
you have grand averages saved or not, etc. But I can send you a sample of
the code I used for my data if you like.
Best,
Steve Politzer-Ahles
On Mon, Sep 3, 2012 at 10:17 PM, Joshua Hartshorne
<jkhartshorne at gmail.com>wrote:
> I have been trying to plot difference waves (well, really difference
> topoplots) in EEGLab. Since there didn't appear to be any way to actually
> do this, I thought I'd get around the problem by exporting the data,
> computing the condition averages, subtracting the one condition from the
> other, and then reimport in order to then plot.
>
> Unfortunately, importing has not bee working. I followed several examples
> in the wiki, including the one for Matlab arrays which gives and example
> involving made-up data (
> http://sccn.ucsd.edu/wiki/A01:_Importing_Continuous_and_Epoched_Data#Importing_a_Matlab_array)
> but invariably get the following error:
>
> eeg_checkset warning: 3rd dimension size of data (1) does not match the
> number of epochs (0), corrected
> eeg_checkset warning: number of columns in data (25600) does not match the
> number of points (0): corrected
> eeg_checkset note: upper time limit (xmax) adjusted so (xmax-xmin)*srate+1
> = number of frames
>
> When I plot the data, it ignores anything I told it about where the epoch
> starts (e.g., -0.2) and starts the epoch at 0 regardless. And when I edit
> channel info, it says there is only 1 channel, even though it's happy to
> plot all the channels.
>
> Does anybody have any idea what might be happening?
>
> Josh Hartshorne
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
--
Stephen Politzer-Ahles
University of Kansas
Linguistics Department
http://www.linguistics.ku.edu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20120904/727d38d4/attachment.html>
More information about the eeglablist
mailing list