<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p style="">Hello eeglabers,<br>
</p>
<p style=""><br>
</p>
<p style="">I was looking for an automatic eye blink removal function and I stumbled across pop_regica. However I also stumbled across a bug, but as usual Im not 100% sure its a bug.<br>
</p>
<p style=""><br>
</p>
<p style="">When I run the function from the GUI, I get the following error:<br>
</p>
<p style=""><br>
</p>
<div style=""><span style="color: rgb(255, 0, 0);">Index exceeds matrix dimensions.</span></div>
<div style=""><br style="color: rgb(255, 0, 0);">
</div>
<div><span style="color: rgb(255, 0, 0);">Error in pop_regica (line 448)</span></div>
<div style=""><span style="color: rgb(255, 0, 0);">tmpdata = reshape( EEG.data(g.chanind,:,:), length(g.chanind), EEG.pnts*EEG.trials);</span><span style="color: rgb(255, 0, 0);"></span><br>
</div>
<p><br>
</p>
<p style="">It appears that g.chanind contains the indexes of the EEG channels after EOG channels have been removed from it. This means that EEG.data has (number of EOG channels)<br>
</p>
<p style="">less channels and indexing into it produces that error.<br>
</p>
<p style=""><br>
</p>
<p style="">I took out (g.chanind, :, :) and it worked fine:<br>
</p>
<p style=""><br>
</p>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">
<span style="color: rgb(255, 0, 0);">tmpdata = reshape( EEG.data, length(g.chanind), EEG.pnts*EEG.trials);</span><span style="color: rgb(255, 0, 0);"></span><br>
</div>
<div><span style="color: rgb(255, 0, 0);"><br>
<span style="color: rgb(0, 0, 0);">Is this a bug and the fix for the bug? Or am I doing something wrong?</span></span></div>
<div><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);"><br>
</span></span></div>
<div><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">Tyler</span></span></div>
<p style=""><br>
</p>
<p style=""><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">*************************
<div style="font-family:Tahoma"><br>
</div>
<div><font face="Arial"><i>Tyler Grummett ( BBSc, BSc(Hons I))</i></font></div>
<div><font face="Arial"><i>PhD Candidate</i></font></div>
<div><font face="Arial"><i>Brain Signals Laboratory</i></font></div>
<div><font face="Arial"><i>Flinders University</i></font></div>
<div><font face="Arial"><i>Rm 5A301</i></font></div>
<div><font face="Arial"><i>Ext 66125</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>