<div dir="ltr">Ok, I dove a bit deeper into the problem, using the matlab profiler I was able to pinpoint the problem to ft_hastoolbox.m called by findcluster.m, and specifically the functions fileparts and exist.... Copy pasting those two functions to ft_statistics_montecarlo solves the issue for me for now. <div>
<br></div><div>The problem seems to be that matlab accessing my filesystem runs slow under linux compared to windows.. I have no idea why and how to solve it but it is not related to fieldtrip. If anyone has suggestions what this might be I would be glad to hear them!</div>
<div><br></div><div>Cheers,</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 16 January 2014 17:11, berry van den berg <span dir="ltr"><<a href="mailto:berryv.dberg@gmail.com" target="_blank">berryv.dberg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Fieldtrip experts,<div><br></div><div>This might be an odd question, but maybe someone has an idea where to start.<br>
<div><br></div><div>I just got a fancy new laptop (gigabyte p34g) and dual boot with ubuntu and windows. I usually work in Ubuntu for analysis, so I ran a time freq statistics analysis and noticed that ft_statistics_montecarlo runs extremely slow under Ubuntu.... In windows it runs at normal speed. The difference is huge, 97 seconds vs, 2 seconds for 100 iterations, 24 subjects.</div>

<div><br></div><div>Speed also doesnt seem influenced by averaging over freq or/and time, it is just slow. </div><div><br></div><div>It is not the cpu clock speed (ubuntu nicely utilizes turbo mode, running max 3ghz), the cpu is not fully utilized though (only 30 percent or so)... </div>

<div><br></div><div>I run matlab 2013b, fieldtrip 20140115</div><div><br></div><div>Specs are </div><div>8gb ram; only 4gb utilized.</div><div>4700HQ cpu</div><div><br></div><div>Any ideas, because I am clueless </div><div>

<br></div><div>Cheers,</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br>Berry van den Berg<br><a href="mailto:berryv.dberg@gmail.com" target="_blank">berryv.dberg@gmail.com</a>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Berry van den Berg<br><a href="mailto:berryv.dberg@gmail.com" target="_blank">berryv.dberg@gmail.com</a>
</div>