<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Niko,<br>
<blockquote type="cite" cite="mid419CC429.6000402@nat.uni-magdeburg.de">i
have got a question concerning 'headplot'. this function plots field
maps for a certain latency, i.e. a single data point. how can i plot an
average map, averaged across sampling points, e.g. the average map of
the time window from 300 to 500 ms?
<br>
</blockquote>
% first find out data points corresponding to your latencies of interest<br>
% the easiest way to do that is to use the function "eeg_lat2point"<br>
%
------------------------------------------------------------------------------------------<br>
tlim = eeg_lat2point( [0.3 0.5], 1, EEG.srate, [EEG.xmin EEG.xmax]);<br>
<br>
% alternativelly you may compute it yourself<br>
% note that the +1 at the end is because the first data point has index
1 and not 0<br>
% ---------------------------------------------------------<br>
tlim(1) = (0.3-EEG.xmin)*EEG.srate+1;<br>
tlim(2) = (0.5-EEG.xmin)*EEG.srate+1;<br>
<br>
% then compute the average for this time period<br>
% ------------------------------------------------------------<br>
tlim = round(tlim); % find closest data points<br>
ERP = mean(EEG.data, 3); % averages over data trials,
i.e., compute the ERP<br>
ERP300to500 = mean(ERP(:,tlim(1):tlim(2)), 2); % average of time points<br>
<br>
% plot the resulting average using headplot<br>
% (assuming you have already computed the splinefile by calling the <br>
% "Plot > ERP map series > In 3-D" menu item at least once)<br>
% ------------------------------------------------------<br>
figure; headplot(ERP300to500, EEG.splinefile, 'title', 'Average ERP
from 300 to 500 ms');<br>
<br>
Arno<br>
<div class="moz-signature">-- <br>
<br>
<b><font face="Arial,Helvetica"><font size="+1">Arnaud Delorme, Ph.D.</font></font></b>
<br>
<font face="Arial,Helvetica"><font size="+1"><font color="#3333ff">Swartz
Center for Computational Neuroscience,</font> <font color="#3333ff">INC,
University of San Diego California</font></font></font>
<br>
La Jolla, CA92093-0961, USA
<p><font face="Arial,Helvetica"><b>Tel</b> :<i>(+1)-858-458-1927 ext 15</i></font>
<br>
<font face="Arial,Helvetica"><b>Fax</b> :<i>(+1)-858-458-1847</i></font>
<br>
<font face="Arial,Helvetica"><b>Web page</b>: <a
href="http://www.sccn.ucsd.edu/%7Earno">sccn.ucsd.edu/~arno</a></font>
<br>
<font face="Arial,Helvetica"><b>To think upon</b>:</font></p>
<blockquote><dt><font face="Arial,Helvetica"> In the process of
defining myself, I have a tendency to set up rules and boundaries and
then forget that rules are made to be broken, as are boundaries to be
expanded and crossed.
<font size="-5"><br>
<br>
</font></font></dt>
<dd><font face="Arial,Helvetica"><i>Kathleen Casey Theisen</i></font></dd>
</blockquote>
</div>
</body>
</html>