<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi Caroline,
<div class=""><br class="">
</div>
<div class="">To be honest, your problem statement is confusing. The pasted code mentions ft_connectivityanalysis, the error message mentions ft_freqanalysis. I cannot make any suggestions based on this. Please visit <a href="https://urldefense.com/v3/__https://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community/__;!!HJOPV4FYYWzcc1jazlU!4bvbQO9bIoS3ZB6N8kln-2SOVbOk5ghW_e8FLK1cDFUtLaLFCPwPhmwazhDAE9Q8EA3BoU23SzxryneH-3cn4z8-m46N1xgeiP2AYA$" class="">https://www.fieldtriptoolbox.org/faq/how_to_ask_good_questions_to_the_community/</a> to
get some inspiration.</div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 7 Mar 2023, at 23:24, Mclaughlin, Caroline via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl" class="">fieldtrip@science.ru.nl</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<a name="_GoBack" class=""></a>Hello,</div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
I am having trouble computing a pairwise-phase consistency between all independent components in my EEG data and an ECG signal. </div>
<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">
</p>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Courier;" class=""> cfg= [];</span><span style="font-family:Courier" class=""></span></div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Courier;" class=""> cfg.channelcmb = {</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">'all'</span><span style="font-size: 10pt; font-family: Courier;" class="">,</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">’ECG1’</span><span style="font-size: 10pt; font-family: Courier;" class="">};</span><span style="font-family:Courier" class=""></span></div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Courier;" class=""> cfg.jackknife=
</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">'no'</span><span style="font-size: 10pt; font-family: Courier;" class="">;</span><span style="font-family:Courier" class=""></span></div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Courier;" class=""> cfg.method=
</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">'ppc'</span><span style="font-size: 10pt; font-family: Courier;" class="">;
</span><span style="font-family:Courier" class=""></span></div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<span style="font-size: 10pt; font-family: Courier;" class=""> fdcomp= ft_connectivityanalysis(cfg, freq);
</span><span style="font-family:Courier" class=""></span></div>
<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">
</p>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
When I specify the combinations as <span style="font-size: 10pt; font-family: Courier;" class="">
cfg.channelcmb = {</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">'all'</span><span style="font-size: 10pt; font-family: Courier;" class="">,</span><span style="font-size:10pt;font-family:Courier;color:rgb(170,4,249)" class="">
‘all’</span><span style="font-size: 10pt; font-family: Courier;" class="">} </span>
the code runs with no issues. However, when I try to specify a particular channel this is the error I am getting:
</div>
<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>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class="">Index in position 2 exceeds array bounds (must not exceed 1500).</font></span></div>
<p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class=""> </font></span></p>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class="">Error in ft_specest_mtmfft (line 246)</font></span></div>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class=""> dum = dum(:,freqboi);</font></span></div>
<p class="MsoNormal" style="margin:0in"><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class=""> </font></span></p>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class="">Error in ft_freqanalysis (line 515)</font></span></div>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class=""> [spectrum,ntaper,foi] = ft_specest_mtmfft(dat, time, 'taper', cfg.taper, options{:}, 'feedback',</font></span></div>
<p class="MsoNormal" style="margin:0in"></p>
<div style="margin: 0in;" class=""><span style="color:rgb(192,0,0)" class=""><font face="arial, sans-serif" class=""> fbopt);</font></span></div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
<br class="">
</div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
My data was converted from a spm D file to the fieldtrip structure using spm2fieldtrip. I would appreciate any suggestions.
</div>
<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>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
Thank you, </div>
<p class="MsoNormal" style="margin:0in;font-size:12pt;font-family:Calibri,sans-serif">
</p>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
Caroline </div>
<div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;" class="">
Brown University </div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4X3YoQ068HK-X5_M02Uk7H_TuDq_8M7mg15u0WYbc1UK49oNJz-DD4QvhpC35eK6Kr220PY2z0cwyhKRql-8HbFa5bsW3I1ehiQdfw$
<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>