<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Thank you <span name="Arjen Stolk">Arjen for clarifications,<br></span></div><span name="Arjen Stolk">Bcs the output is in the trial format anyway, technically, I can proceed with the head motion regression method on the resting state by dividing the data into smaller segments; which I did. I have 120 sec of MEG data (SR=600 Hz) that I divided into 10, or 20, or 30 sec trials and run the ft_regressconfound. Every time I  run into the out of memory problem.<br>
<br>
</span></div><span name="Arjen Stolk">Matlab error message:<br></span></div><span name="Arjen Stolk">??? Error using==>mldivide<br></span></div><span name="Arjen Stolk">Out of memory.<br><br>
</span></div><span name="Arjen Stolk">Error in ==> </span><span name="Arjen Stolk">ft_regressconfound at 213<br></span></div><span name="Arjen Stolk">beta = regr\dat; % B= X\Y<br><br></span></div><span name="Arjen Stolk">The error appears in the part of the code where the linear equation is solved directly.<br>
I tried to only work with a subset of all trials (half for example) with no luck.<br><br></span></div><span name="Arjen Stolk">I rum MatlabR2010a on Windows XP 32-bit with the following memory allocation in Matlab:<br></span></div>
<span name="Arjen Stolk">Max possible array: 851 Mb<br></span></div><span name="Arjen Stolk">Memory available for all array: 1703 Mb<br></span></div><span name="Arjen Stolk">Memory used by Matlab: 850 Mb<br></span></div><span name="Arjen Stolk">RAM: 3317 Mb<br>
<br></span></div><span name="Arjen Stolk">Were anybody else able to run this motion regression algorithm in Matlab without out of memory? Is there anything I can do to avoid the problem? I can share the code if needed.<br>
<br></span></div><span name="Arjen Stolk">Thanks in advance,<br>Inna<br></span><div><div><span name="Arjen Stolk"><br><br><br><br></span><div><div><div><div><span name="Arjen Stolk"> <br></span><div><span name="Arjen Stolk"><br>
</span><div><div><span name="Arjen Stolk"><br></span><div><div><div><div><div><span name="Arjen Stolk"><br></span></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div>Inna McGowin<br></div>
<br><br><div class="gmail_quote">On Mon, Nov 18, 2013 at 10:42 AM, Arjen Stolk <span dir="ltr"><<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p>Hi Inna, <br>
Ft_regressconfound will remove trial by trial variability of signal amplitude or frequency power that can be explained by variability in head position over those trials. The input, whether sensor or source level, should contain a trial field (keep trials in the previous step - eg at timelockanalysis). Also variance due to head position can only be reliably estimated when the neural signal is consistent over trials (as with an event related modulation or potential). I would not know how to segment a resting state into trials (for further analysis, given that those analyses typically involve connectivity measures over the resting period) but if you an idea on how to do this, you could give ft_regressconfound a try. Note that the output will also be in the trials format. Hope this has made its use a bit more clear. Yours, arjen<br>

</p>
<p>Op 13 nov. 2013 11:50 schreef "McGowin, Inna" <<a href="mailto:mcgoiv0@wfu.edu" target="_blank">mcgoiv0@wfu.edu</a>> het volgende:</p><div><div class="h5"><br>
><br>
> Hello everybody,<br>
><br>
> I would like to use the  ft_regressconfound function to remove/reduce the head motion in a continuous MEG data.<br>
> It's a resting state data and no averaging can be applied. Is there a way to apply the correction without using the<br>
><br>
> ft_timelockanalysis(cfg, data) function? <br>
><br>
> I understand that the ft_regressconfound function has limits and caveats but I still would like to see the results of its correction.<br>
><br>
><br>
> Another way to ask this question is: <br>
> what is the format/structure of the second input (timelock) in the <br>
> ft_regressconfound(cfg, timelock) function and how it can be created without ft_timelockanalysis?<br>
><br>
><br>
> Thanks,<br>
><br>
> Inna <br>
><br></div></div>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
> <a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<p></p>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>