<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif">Dear all,</div><div class="gmail_default" style="font-family:"times new roman",serif"><br></div><div class="gmail_default" style="font-family:"times new roman",serif">I am trying to process multiple datasets of .EDF format on EEGLAB and I was wondering could someone help me correcting the script I have compiled so far using the tips provided here <a href="https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts">https://sccn.ucsd.edu/wiki/Chapter_02:_Writing_EEGLAB_Scripts</a>. The current error that I get is: </div><div class="gmail_default" style="font-family:"times new roman",serif">Error using edfread (line 125)</div><div class="gmail_default" style="font-family:"times new roman",serif">No such file or directory</div><div class="gmail_default" style="font-family:"times new roman",serif">Error in StepOne (line 9)</div><div class="gmail_default" style="font-family:"times new roman",serif"><span style="white-space:pre">           </span>EEG = edfread(setname,'/Users/mohithverma/Desktop/PSG_Data'); %</div><div class="gmail_default" style="font-family:"times new roman",serif">                Load the dataset</div><div class="gmail_default" style="font-family:"times new roman",serif">My datasets are named as 304_sleep data.edf; 305_sleep data.edf...</div><div class="gmail_default" style="font-family:"times new roman",serif">Your help is much appreciated! Here's the code that I have come up with so far:</div><div class="gmail_default" style="font-family:"times new roman",serif">





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">eeglab</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">clear;</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier">Ns = 4;</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)"><span class="gmail-s1" style="color:rgb(4,51,255)">for</span><span class="gmail-s2" style="color:rgb(0,0,0)"> S = 1:Ns<span class="gmail-Apple-converted-space">  </span></span>% For each of the subjects</p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(37,153,45)"><span class="gmail-s2" style="color:rgb(0,0,0)"><span class="gmail-Apple-converted-space">    </span>mean_powbase = []; </span>% Initialize the baseline spectra average over all conditions for each subject</p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space">    </span>setname = [<span class="gmail-s3" style="color:rgb(178,69,243)">'subj'</span> int2str(S) <span class="gmail-s3" style="color:rgb(178,69,243)">'.edf'</span>];<span class="gmail-Apple-converted-space">  </span><span class="gmail-s4" style="color:rgb(37,153,45)">% Build dataset name</span></p>
<p class="gmail-p3" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;color:rgb(178,69,243)"><span class="gmail-s2" style="color:rgb(0,0,0)"><span class="gmail-Apple-converted-space">        </span>EEG = edfread(setname,</span>'/Users/mohithverma/Desktop/PSG_Data'<span class="gmail-s2" style="color:rgb(0,0,0)">); </span><span class="gmail-s4" style="color:rgb(37,153,45)">% Load the dataset</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space">        </span>[ALLEEG EEG] = eeg_store(ALLEEG, EEG);<span class="gmail-Apple-converted-space">  </span><span class="gmail-s4" style="color:rgb(37,153,45)">% Store the dataset in ALLEEG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier"><span class="gmail-Apple-converted-space">        </span>[ersp,itc,powbase{s}] =pop_timef( ALLEEG(s),0, 1, [-100 600], 0, <span class="gmail-s3" style="color:rgb(178,69,243)">'plotitc'</span>, <span class="gmail-s3" style="color:rgb(178,69,243)">'off'</span>, <span class="gmail-s3" style="color:rgb(178,69,243)">'plotersp'</span>, <span class="gmail-s3" style="color:rgb(178,69,243)">'off'</span> );</p>
<p class="gmail-p4" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:10px;line-height:normal;font-family:Courier;min-height:12px"><span class="gmail-Apple-converted-space">        </span></p></div><div><br></div><div dir="ltr"><div class="gmail_default" style="font-family:"times new roman",serif">Regards,</div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="2" face="times new roman, serif">Mohith M. Varma (Mo)</font></div><div><span style="font-family:"times new roman",serif;font-size:small">Graduate Research Assistant</span><br></div><div><font size="2" face="times new roman, serif"><br></font></div><div><font size="2" face="times new roman, serif">Social & Cognitive Neuroscience Laboratory</font></div><div><span style="font-family:"times new roman",serif;font-size:small">Department of Psychology</span></div><div><font size="2" face="times new roman, serif">Faculty of Social Sciences</font></div><div><font size="2" face="times new roman, serif">The University of Hong Kong</font></div><div><font size="2" face="times new roman, serif">Tel: (+852) 52622875</font></div><div><font size="2" face="times new roman, serif">Email: <a href="mailto:mohith96@connect.hku.hk" target="_blank">mohith96@connect.hku.hk<br></a></font></div><div style="font-size:small"></div></div></div></div></div></div></div></div></div></div>