<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 Gian Marco,<div class=""><br class=""></div><div class="">did you check which „entropy“-function is called in your analysis?</div><div class="">There is an „entropy“-function in the image processing toolbox, that only takes a single input, so maybe this could be the reason Matlab complains that you are giving too many inputs to your function.</div><div class=""><br class=""></div><div class="">Maybe that helps…</div><div class=""><br class=""></div><div class="">Julian</div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Am 19.02.2021 um 09:44 schrieb Gian Marco Duma <<a href="mailto:gianmarco.duma@unipd.it" class="">gianmarco.duma@unipd.it</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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 class="">That's why I'm not sure where the error comes from.</div><div class="">best </div><div class="">Gian Marco</div></div><br class=""><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" class="">jan.schoffelen@donders.ru.nl</a>> ha scritto:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">
Ciao Gianmarco,
<div class=""><br class="">
</div>
<div class="">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 class="">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 class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 18 Feb 2021, at 10:57, Gian Marco Duma <<a href="mailto:gianmarco.duma@unipd.it" target="_blank" class="">gianmarco.duma@unipd.it</a>> wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">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 class="">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 class=""><br class="">
</div>
<div class="">Error using entropy<br class="">
Too many input arguments.<br class="">
<br class="">
Error in information (line 501)<br class="">
[H{:}] = entropy(R, opts, outputOptsList{:});<br class="">
<br class="">
Error in ft_connectivity_mutualinformation (line 156)<br class="">
output(k,p,m) = information(R2, opts, 'I'); % this computes mutual information<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">What am I doing wrong?</div>
<div class="">Thanks</div>
</div>
<br class="">
<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" class="">x.vrijdag@auckland.ac.nz</a>> ha scritto:<br class="">
</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" class="">
<div class=""><p class="MsoNormal"><span class="">HI Gian,<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">I am using the mutual information analysis provided by the IBTB toolbox in fieldtrip.<u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">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" class="">
https://github.com/fieldtrip/fieldtrip/tree/master/external/ibtb</a><u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></u></span></p><p class="MsoNormal"><span class="">In general, I can recommend you to use the ft_connectivityanalysis function instead of the lower-level function
</span>ft_connectivity_mutualinformation.<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">Regards,<u class=""></u><u class=""></u></p><p class="MsoNormal"><u class=""></u> <u class=""></u></p><p class="MsoNormal">Xavier<span class=""><u class=""></u><u class=""></u></span></p><p class="MsoNormal"><span class=""><u class=""></u> <u class=""></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" class=""><p class="MsoNormal"><b class=""><span style="font-size:12pt" class="">From: </span>
</b><span style="font-size:12pt" class="">fieldtrip <<a href="mailto:fieldtrip-bounces@science.ru.nl" target="_blank" class="">fieldtrip-bounces@science.ru.nl</a>> on behalf of Gian Marco Duma <<a href="mailto:gianmarco.duma@unipd.it" target="_blank" class="">gianmarco.duma@unipd.it</a>><br class="">
<b class="">Reply to: </b>FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Date: </b>Thursday, 18 February 2021 at 12:14 PM<br class="">
<b class="">To: </b>"<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>" <<a href="mailto:fieldtrip@science.ru.nl" target="_blank" class="">fieldtrip@science.ru.nl</a>><br class="">
<b class="">Subject: </b>[FieldTrip] Error with mutual information<u class=""></u><u class=""></u></span></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
<div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Error using ft_hastoolbox (line 450)<br class="">
the IBTB toolbox is not installed, see <a href="http://www.ibtb.org/" target="_blank" class="">
http://www.ibtb.org</a><br class="">
<br class="">
Error in ft_connectivity_mutualinformation (line 48)<br class="">
ft_hastoolbox('ibtb', 1);<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><a href="https://link.springer.com/article/10.1186/1471-2202-10-81" target="_blank" class="">https://link.springer.com/article/10.1186/1471-2202-10-81</a><u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
<div class=""><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 class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Do you have any suggestions? <u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal">Thanks<u class=""></u><u class=""></u></p>
</div>
<div class=""><p class="MsoNormal"><u class=""></u> <u class=""></u></p>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank" class="">https://doi.org/10.1371/journal.pcbi.1002202</a><br class="">
</blockquote></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://doi.org/10.1371/journal.pcbi.1002202<br class=""></div></blockquote></div><br class=""></div></body></html>