<div dir="ltr">Dear Sofia,<div><br></div>It might be that something is either off with the input data, or your configuration of ft_connectivityanalysis. <div><br></div><div><div>A) I would first check that the two channels of data you are using are not (highly) correlated, e.g. by just plotting (part of) them together.</div><div><div>B) Due to the fact you are using intracranial data of very closely spaced electrodes, more detail on their preprocessing would also be helpful; e.g. are you using bipolar references/CSD or a common references to both? </div><div><br></div><div>Getting 1's indicate something is more probably off with your analyses though. To be able for people to evaluate that:</div><div></div>C) Share your configuration to both ft_connectivity, and the previous ft_freqanalysis, so that people can evaluate whether you are calling those functions correctly. Preprocessing steps will also be helpful.<br>D) Do you get any error/warning messages at any point?</div><div><br>I hope this helps,<br>Stephen</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 2 Mar 2022 at 12:59, CARRION-FALGARONA Sofia via fieldtrip <<a href="mailto:fieldtrip@science.ru.nl">fieldtrip@science.ru.nl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="FR" style="overflow-wrap: break-word;">
<div class="gmail-m_-8195808907421030428WordSection1">
<div>
<p class="MsoNormal"><span style="font-size:12pt">Dear Community, <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt">I am Sofia and I work at the Brain Paris institute. I am currently looking at rodent’s brain activity within different brain’s region simultaneously by using deep multi-electrodes.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt">I am trying to use ft_correlationanalysis function in order to compare the power correlation of different channel through the time.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt">I was expecting to observe some fluctuation in the correlation but I obtained a matrix of  1…<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt">Can someone help me in order to get the correct correlation between 2 channels ?
<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">stat  = ft_connectivityanalysis(cfgtemp, timefreq_alldata);
</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">disp( stat);</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">>> label: {2×1 cell}</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   dimord: 'chan_chan_freq_time'</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   powcorrspctrm: [2×2×50×801 double]</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   time: [1×801 double]</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   freq: [1×50 double]</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   dof: 1</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">   cfg: [1×1 struct]</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"></span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">data_corr_temp  = stat.powcorrspctrm(1,1,:,:);</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">data_corr       = permute(data_corr_temp ,[3 4 1 2 ]);                 
</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">disp(data_corr);</span><span lang="EN-US" style="font-size:12pt;font-family:"Courier New";color:black"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:35.4pt"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">>> 1 1 1 1 1 1 1 1 1 1 . .
</span><span lang="EN-US" style="font-size:12pt;color:black">. => actually return a Matrix of 50x801 of 1</span><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black">
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:"Courier New";color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt;color:black">I thank you for your help !<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt;color:black">Best Regards,
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:12pt;color:black">Sofia<u></u><u></u></span></p>
</div>
</div>

_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div>