<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have 20 epoched datasets from 10 different subjects – 2 datasets per subject as there were 2 different conditions. I created averaged scalp maps (for all 10 subjects together, for all channels) in the alpha range (8-12Hz) using the ‘Study/Precompute
channel measures’ and ‘Study/Plot channel measures’ functions. I used 10 EEGLAB ‘.set’ files for one condition and another 10 for a different condition.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I ran the ‘Precompute channel measures routine’, I used these parameters: 'cycles', [3 0.5], 'baseline', [-3500 -1500], 'freqs', [2 60], 'alpha', 0.05, 'ntimesout', 400, 'padratio',1.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I then used ‘Plot channel measures’, using ‘8 12’ (8-12Hz) as the frequency parameter and did this repeatedly for 100ms time windows to see what is happening from -1000ms before the event to 1500ms after the event.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I then wanted to plot ERSP over time for a select number of channels (as visually identified using the scalp maps – those with strong ERD/ERS ), so I used a function created in MatLab that uses the ‘newtimef’ function, which creates the
‘ersp_sig’ variable containing significant ERSP. ‘ersp_sig’ is a 3-element vector – ersp_sig(a,b,c) where ‘a’ is frequency,’b’ is time points (400 per epoch), and ‘c’ is channels (35 in this case).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is the function I used:<o:p></o:p></p>
<p class="MsoNormal">-------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">function</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> [ersp,ersp_sig] = plotERSPTopo(dirname,filename)</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">eegchannels = 1:35;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">cycles = [3 0.5];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">freqs = [2 60];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">baseline = [-3500 -1500];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">tlimits = [-4000 4000];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">alpha = 0.05;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">mine = -7;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">maxe = 7;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">eeg = pop_loadset(filename,dirname);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">close
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">all</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> i=eegchannels</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> tmpsig = eeg.data(i,:,:);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> tmpsig = tmpsig(:);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> triallength = size(eeg.data,2);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> close
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">all</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> fprintf(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'PROCESSING CHANNEL #%2.0f\n'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">
,i);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> [ersp(:,:,i),itc,powbase,times,freqs,erspboot,itcboot] =
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">...</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> newtimef(tmpsig,triallength,tlimits,eeg.srate,cycles,
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">...</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'baseline'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,baseline,
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'alpha'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">, alpha,
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'freqs'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">, freqs,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'padratio'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,1,
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">...</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'plotersp'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'on'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'plotitc'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'off'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'timesout'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,400,
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">...</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">,</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'title'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,eeg.chanlocs(i).labels,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'erspmax'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,7);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> erspimage{i} = getframe(gcf,[116 80 347 308]);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">
i1=1:size(ersp,1);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> i2=1:size(ersp,2);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">if</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> (ersp(i1,i2,i)>erspboot(i1,1)) & (ersp(i1,i2,i)<erspboot(i1,2));</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> ersp_sig(i1,i2,i)=0;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">else</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> ersp_sig(i1,i2,i)=ersp(i1,i2,i);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal">I then used the following function to plot what I was interested in.<o:p></o:p></p>
<p class="MsoNormal">X is the file with all 10 datasets appended together for one condition and Y is another file with 10 appended datasets for the other condition.<o:p></o:p></p>
<p class="MsoNormal">(These are the same datasets I used to create the scalp maps).<o:p></o:p></p>
<p class="MsoNormal">-------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">function</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> erd_alpha_AB10 = erd_alpha_AB10(X,Y</span><span lang="FR-CA" style="font-size:10.0pt;font-family:"Courier New";color:black">)</span><span lang="FR-CA" style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="FR-CA" style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">% Plot, for AB10, ERD% for selected channels</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%Load file for left movements</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ersp_alpha_left_sig = load(X,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'ersp_sig'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ersp_alpha_left_sig = ersp_alpha_left_sig.ersp_sig;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%Load file for right movements</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ersp_alpha_right_sig = load(Y,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'ersp_sig'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ersp_alpha_right_sig = ersp_alpha_right_sig.ersp_sig;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%Convert to ERD/ERS%</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">erd_alpha_left_sig=((10.^((ersp_alpha_left_sig)/10))-1)*100;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">erd_alpha_right_sig=((10.^((ersp_alpha_right_sig)/10))-1)*100;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%Calculate mean values for the alpha range<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%(alpha range (8-12Hz) is actually indices 7-11 as frequency range starts at 2Hz)</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> j=1:400;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> k=1:35;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> erd_alpha_left_sig_mean(j,k)= (erd_alpha_left_sig(7,j,k)+erd_alpha_left_sig(8,j,k)+erd_alpha_left_sig(9,j,k)+erd_alpha_left_sig(10,j,k)+erd_alpha_left_sig(11,j,k))/5;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> j=1:400;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> k=1:35;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black"> erd_alpha_right_sig_mean(j,k)= (erd_alpha_right_sig(7,j,k)+erd_alpha_right_sig(8,j,k)+erd_alpha_right_sig(9,j,k)+erd_alpha_right_sig(10,j,k)+erd_alpha_right_sig(11,j,k))/5;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">
</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">% Plots</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">t=[-4000:20:3999];</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">% Left</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch1_left=12;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%FC2</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch2_left=27;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%CP4</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch3_left=23;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%CP3</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">figure;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">title([</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Alpha ERD% for all AB10 subjects for left sided movements'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">]);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">xlabel(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Time, in ms (relative to movement onset at 0)'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ylabel(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'ERD/ERS %'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">)</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">axis([-4000 4000 -100 100]);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">hold
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">on</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_left_sig_mean(:,ch1_left));</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_left_sig_mean(:,ch2_left),</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'r'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_left_sig_mean(:,ch3_left),</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'g'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">legend(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'FC2'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'CP4'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'CP3'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Location'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'NorthWest'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">% Right</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch1_right=11;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%FCz</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch2_right=23;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%CP3</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ch3_right=27;
</span><span style="font-size:10.0pt;font-family:"Courier New";color:forestgreen">%CP4</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">figure;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">title([</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Alpha ERD% for all AB10 subjects for right sided movements'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">]);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">xlabel(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Time, in ms (relative to movement onset at 0)'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">ylabel(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'ERD/ERS %'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">)</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">axis([-4000 4000 -100 100]);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">hold
</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">on</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">;</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_right_sig_mean(:,ch1_right));</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_right_sig_mean(:,ch2_right),</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'r'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">plot(t,erd_alpha_right_sig_mean(:,ch3_right),</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'g'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:black">legend(</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'FCz'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'CP3'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'CP4'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'Location'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">,</span><span style="font-size:10.0pt;font-family:"Courier New";color:#A020F0">'NorthWest'</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">);</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:12.0pt;font-family:"Courier New""><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12.0pt;font-family:"Courier New""><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-------------------------------------------------------------------------------<o:p></o:p></p>
<p class="MsoNormal">When I look at the plots, they don’t quite match what I see on the scalp maps. For example when I plot FC2, CP3 and CP4 together, my plots show that CP4 is activated before FC2 and a with a greater value, which is not what I see on the
scalp maps – FC2 has a dark blue ‘patch’ (strong ERD) whilst CP4 is green – so I was expecting to see this reflected on the plot.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoPlainText">I don’t know where I’ve got it wrong. Is there an obvious error I have made? I wonder if the way EEGLAB calculates things when producing scalp maps is different from the script I have, and if you might know of a way that I could check
this? Can I access the data that is used to create the scalp maps?<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for any advice on this.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Seb<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sebastien Pollet<o:p></o:p></p>
<p class="MsoNormal">University of Southampton<o:p></o:p></p>
<p class="MsoNormal"><a href="mailto:sebastien.pollet@soton.ac.uk">sebastien.pollet@soton.ac.uk</a>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>