<div dir="ltr">In the ft_connectivity_mutualinformation the indication of the data input is 'The input data should be a Nchan x Nobservations matrix'. My data is a classic n-ny-m matlab matrix with the n= number of channels (in my case the vertices of the source) and m= number of time points. I thought that maybe reducing the source vertices (by downsampling to an atlas) could help, but it is not the dimension of my matrix the problem, since I continue to have the same error. <div>That's why I'm not sure where the error comes from.</div><div>best </div><div>Gian Marco</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno gio 18 feb 2021 alle ore 15:15 Schoffelen, J.M. (Jan Mathijs) <<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank">jan.schoffelen@donders.ru.nl</a>> ha scritto:<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>
Ciao Gianmarco,
<div><br>
</div>
<div>I guess the answer on your question ‘what am I doing wrong’ depends on how you have formatted your Brainstorm-derived data into a structure that fieldtrip can work with.</div>
<div>If you are working with ft_connectivity_mutualinformation directly, you should study a bit what the required formatting of the input matrix is. Probably the order of the dimensions or the orientation of the matrix is wrong.</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Jan-Mathijs</div>
<div><br>
</div>
<div><br>
<div><br>
<blockquote type="cite">
<div>On 18 Feb 2021, at 10:57, Gian Marco Duma <<a href="mailto:gianmarco.duma@unipd.it" target="_blank">gianmarco.duma@unipd.it</a>> wrote:</div>
<br>
<div>
<div dir="ltr">Xavier, thanks for your quick reply. I solved the installation problem, however I have two more questions. I'm not sure how to compute mutual information with the ft_connectivityanalysis function, since I did not find mutual information
within the methods section of the function.
<div>The second question is: my data are basically resting state source activity I extracted from brainstorm with the dimensions 15002 (vertices) x 2000 (time). In the mutualinformation function says 'The input data should be a Nchan x Nobservations
matrix'. However, when I try tu run ft_connectivity_mutualinformation I receive the following error:</div>
<div><br>
</div>
<div>Error using entropy<br>
Too many input arguments.<br>
<br>
Error in information (line 501)<br>
[H{:}] = entropy(R, opts, outputOptsList{:});<br>
<br>
Error in ft_connectivity_mutualinformation (line 156)<br>
output(k,p,m) = information(R2, opts, 'I'); % this computes mutual information<br>
</div>
<div><br>
</div>
<div>What am I doing wrong?</div>
<div>Thanks</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Il giorno gio 18 feb 2021 alle ore 03:13 Xavier Vrijdag <<a href="mailto:x.vrijdag@auckland.ac.nz" target="_blank">x.vrijdag@auckland.ac.nz</a>> ha scritto:<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="EN-NZ">
<div>
<p class="MsoNormal"><span>HI Gian,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>I am using the mutual information analysis provided by the IBTB toolbox in fieldtrip.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>You can check in the fieldtrip/external/ folder if the IBTB folder exists. In my fieldtrip downloads the IBTB toolbox is available. Otherwise you can download it from the fieldtrip github:
<a href="https://github.com/fieldtrip/fieldtrip/tree/master/external/ibtb" target="_blank">
https://github.com/fieldtrip/fieldtrip/tree/master/external/ibtb</a><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>In general, I can recommend you to use the ft_connectivityanalysis function instead of the lower-level function
</span>ft_connectivity_mutualinformation.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Regards,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Xavier<span><u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:12pt">From: </span>
</b><span style="font-size:12pt">fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank">fieldtrip-bounces@science.ru.nl</a>> on behalf of Gian Marco Duma <<a href="mailto:gianmarco.duma@unipd.it" target="_blank">gianmarco.duma@unipd.it</a>><br>
<b>Reply to: </b>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
<b>Date: </b>Thursday, 18 February 2021 at 12:14 PM<br>
<b>To: </b>"<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
<b>Subject: </b>[FieldTrip] Error with mutual information<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hi everyone, I'm trying to run mutual information as a measure of functional connectivity. When I run the command ft_connectivity_mutualinformation I receive the following message
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Error using ft_hastoolbox (line 450)<br>
the IBTB toolbox is not installed, see <a href="http://www.ibtb.org/" target="_blank">
http://www.ibtb.org</a><br>
<br>
Error in ft_connectivity_mutualinformation (line 48)<br>
ft_hastoolbox('ibtb', 1);<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The web site reported in the error line is not active anymore. Therefore I downloaded the ibtb toolbox from the supplementary material of the paper Magri et al. 2009, at the following link<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://link.springer.com/article/10.1186/1471-2202-10-81" target="_blank">https://link.springer.com/article/10.1186/1471-2202-10-81</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I installed as usual the toolbox, I decompressed it and I added it to the matlab path as suggested by the installation file. However I continue to receive the same error message.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Do you have any suggestions? <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</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>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</div>
</blockquote>
</div>
<br>
</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>