<div dir="ltr"><p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><a name="_GoBack"></a>Hello,</p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">I am having trouble computing a pairwise-phase consistency
between all independent components in my EEG data and an ECG signal.  </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Courier;color:black">        cfg= [];</span><span style="font-family:Courier"></span></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Courier;color:black">        cfg.channelcmb = {</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)">'all'</span><span style="font-size:10pt;font-family:Courier;color:black">,</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)">’ECG1’</span><span style="font-size:10pt;font-family:Courier;color:black">};</span><span style="font-family:Courier"></span></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Courier;color:black">        cfg.jackknife= </span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)">'no'</span><span style="font-size:10pt;font-family:Courier;color:black">;</span><span style="font-family:Courier"></span></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Courier;color:black">        cfg.method= </span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)">'ppc'</span><span style="font-size:10pt;font-family:Courier;color:black">; </span><span style="font-family:Courier"></span></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><span style="font-size:10pt;font-family:Courier;color:black">        fdcomp=
ft_connectivityanalysis(cfg, freq); </span><span style="font-family:Courier"></span></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">When I specify the combinations as <span style="font-size:10pt;font-family:Courier;color:black">cfg.channelcmb
= {</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)">'all'</span><span style="font-size:10pt;font-family:Courier;color:black">,</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)"> ‘all’</span><span style="font-size:10pt;font-family:Courier;color:black">} </span>the code runs with no issues.
However, when I try to specify a particular channel this is the error I am
getting: </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">Index in position 2 exceeds
array bounds (must not exceed 1500).</font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif"> </font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">Error in ft_specest_mtmfft (line
246)</font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">    dum = dum(:,freqboi);</font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif"> </font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">Error in ft_freqanalysis (line
515)</font></span></p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">      [spectrum,ntaper,foi] =
ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:}, 'feedback',</font></span></p><p class="MsoNormal" style="margin:0in">















</p><p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)"><font face="arial, sans-serif">      fbopt);</font></span></p><p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"><br></p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">My data was converted from a spm D file to the fieldtrip
structure using spm2fieldtrip. I would appreciate any suggestions. </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">Thank you, </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">Caroline </p>

<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">Brown University </p></div>