<div dir="ltr"><div dir="ltr"><div dir="ltr">Dear list,<div><br></div><div>When preprocessing my data, I use the ERPLAB toolbox to filter the data with a 1-50 Hz bandpass filter. See the following code:</div><div><br></div><div><div>EEG = pop_loadset; % load the 'IAS1_pruned_[ppnr]' dataset from your data folder that pops up</div><div>EEG  = pop_basicfilter( EEG,  1:64 , 'Boundary', 'boundary', 'Cutoff', [ 1 50], 'Design', 'butter', 'Filter', 'bandpass', 'Order',  2, 'RemoveDC', 'on' );</div><div><br></div><div>% Rename the dataset</div><div>EEG.setname='IAS1_1-50filter_19';</div><div>EEG = eeg_checkset( EEG );</div><div><br></div><div>% Save the dataset</div><div>EEG = pop_saveset( EEG,...</div><div>    'filename','IAS1_1-50filter_19.set','filepath','Y:\\staff\\let\\SemanticsAndCognition\\LaRoi\\PhD\\Study 1 - EEG+priming task\\Data\\EEG\\Preprocessing\\');</div><div>EEG = eeg_checkset( EEG );</div><div><br></div><div><br></div><div><br></div><div>For all participants, this worked fine. However, for one particular participant I get an error when running the following code. The error message is the following:</div><div><br></div><div><div>Index in position 2 exceeds array bounds (must not exceed 124).</div><div><br></div><div>Error in removedc (line 57)</div><div>meanvalue = mean(data(chanArray,windowsam(1):windowsam(2)),2);</div><div><br></div><div>Error in basicfilter (line 240)</div><div>                              EEG.data(chanArray,bp1:bp2,j) = removedc(EEG.data(chanArray,bp1:bp2,j), round(EEG.srate/2));</div><div><br></div><div>Error in pop_basicfilter (line 298)</div><div>[EEG, ferror] = basicfilter( EEG, options2{:});</div></div><div><br></div><div>I don't no where this error comes from and how I can solve it, since I'm doing exactly the same for all participants. Could you help me out? I added the relevant dataset to the attachment.</div><div><br></div><div>Many thanks in advance.</div><div><br></div><div>Kind regards,</div><div>Amélie la Roi</div><div>PhD candidate University of Groningen, the Netherlands<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/a/rug.nl/file/d/1idE0498B0t2zetB6yR79WH57k_NGQy5A/view?usp=drive_web" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">IAS1_pruned_19.fdt</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; position: relative; top: -1px; display: none;"></div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/a/rug.nl/file/d/1V0mOcqFpOM2W6FJ8TprhJzusqzI1a7iy/view?usp=drive_web" target="_blank" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0;border:none"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">IAS1_pruned_19.set</span></a><img src="//ssl.gstatic.com/ui/v1/icons/common/x_8px.png" style="opacity: 0.55; cursor: pointer; float: right; position: relative; top: -1px; display: none;"></div></div><div><br></div><div><br></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Amélie la Roi, MA<div>PhD student CLCG, Semantics and Cognition</div><div>University of Groningen, the Netherlands</div><div>Harmony building, room 1311.0412 | Phone: +31 50 363 6683</div><div><br></div></div></div></div></div></div></div></div></div>
</div></div></div></div>