Dear Sara,<div><br></div><div>It seems that your reasoning is correct. Please try to move the EOG signals in the last rows of the EEG.data matrix. I'll note this issue in order to be solved in a later version of REGICA.</div>

<div><br></div><div>Thank you a lot for you help</div><div>Manousos Klados<br><br><div class="gmail_quote">2012/3/21 Sara Assecondi <span dir="ltr"><<a href="mailto:s.assecondi@bham.ac.uk">s.assecondi@bham.ac.uk</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear Manousos, dear list,<br>
<br>
I would like to use REG-ICA to remove blinks from EEG data.<br>
However, I have encountered a problem so far: it seems to me that pop_regica.m "does not like" when the EOG channel index does not correspond to the last row of the data matrix.<br>
<br>
I have a dataset of 28 channels and, let's say my EOG channel is number 26.<br>
If I run REG-ICA I get the following message:<br>
>> EEGLAB error in function pop_regica() at line 448.<br>
<br>
This is the piece of code that I think is giving me the problem:<br>
>>tmp_dataa=EEG.data(g.chanind,:,:); % line 427-432<br>
>>EOG=EEG.data(EOGindex,:,:);<br>
>>EEG.data=zeros(size(tmp_dataa));<br>
>>EEG.data=tmp_dataa;<br>
>>EEG.icachansind = g.chanind;<br>
>>EEG.nbchan=g.nbchan;<br>
>> ...<br>
>>tmpdata = reshape( EEG.data(g.chanind,:,:), length(g.chanind), EEG.pnts*EEG.trials); % line 448<br>
<br>
In my case (28channel, EOG index 26), g.chanind=[1:25,27,28], however, in line 427-432 EEG.data is reassigned to a matrix of size(length(g.chanind),x,x) that in my case is (27,x,x). Therefore g.chanind(end)=28 is out of range.<br>


<br>
If this actually is the problem, in my case it is easy to solve, but I was just wondering if my reasoning is correct or I misunderstood something.<br>
<br>
Thank you all in advance for your help<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">Sara<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Manousos A. Klados<div>________________________________________________<br><div><div>B.Sc Mathematics</div><div>M.Sc Medical Informatics</div><div>

________________________________________________</div>PhD Candidate -- Research Assistant<br>Group of Applied Neurosciences<br>Lab of Medical Informatics<br>School of Medicine<br>Aristotle University of Thessaloniki<br>P.O. Box 323 54124 Thessaloniki Greece<br>

_________________________________________________<br>Tel: +30-2310-999332<br>Fax:+30-2310-999263<br>Website: <a href="http://lomiweb.med.auth.gr/gan/mklados" target="_blank">http://lomiweb.med.auth.gr/gan/mklados</a><br>
<br>
________________________________________________________________<br>Δρώ γιατί Αντιδρώ: Δεν τυπώνω αυτό το mail γιατί προστατεύω το περιβάλλον.<br>Acting by Reacting: By not printing this e-mail I help protect the environment.<br>

________________________________________________________________</div></div><br>
</div>