<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,255)">Dear Aleksandra,<br><br></div><div class="gmail_default" style="color:rgb(0,0,255)">I am not sure your problem has been solved. Bellow is a code at the Matlab command that uses a different data set for baseline.<br>
<br></div><div class="gmail_default" style="color:rgb(0,0,255)">Kind regards,<br></div><div class="gmail_default" style="color:rgb(0,0,255)">Muluh<br><br><br></div><div class="gmail_default" style="color:rgb(0,0,255)">

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">[ALLEEG EEG CURRENTSET ALLCOM] =
eeglab; %open EEGLAB</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = pop_readegi(Baseline data,
[],[],</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'auto'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); % Load your baseline data </span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">[ALLEEG EEG CURRENTSET] =
pop_newset(ALLEEG, EEG, 0,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'setname'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'Baseline'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'gui'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'off'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); </span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">%</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = pop_epoch( EEG, {<span style>  </span></span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'Baseline Condition'</span><span style="font-size:10pt;font-family:"Courier New";color:black"><span style>  </span>}, [-0.5<span style>           </span>0], </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'newname'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'Baseline
epoch'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'epochinfo'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'yes'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); </span><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">% Extract the required epoch length
for baseline, 500 ms in this case - you can change to what suites you</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">[ALLEEG EEG CURRENTSET] =
pop_newset(ALLEEG, EEG, 1,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'overwrite'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'on'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'gui'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'off'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); </span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = eeg_checkset( EEG );</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">%Get the mean of
each channel from the baseline data set above</span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG.data = mean(EEG.data,2); </span><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">% This
give a vector of number of channels x 1 sample point - which is the mean for the channel</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG.pnts = 1; </span><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">% Reset
the number of sample points to 1 so as to maintain consistency of data
structure in EEGLAB</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG.times = EEG.times(1); </span><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">% Reset
the times to 1 so as to maintain consistency of data structure in EEGLAB</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = eeg_checkset( EEG );</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">eeglab </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">redraw</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal"> </p>

<p class="MsoNormal">% Load and epoch your data</p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = pop_readegi(</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'Data</span><span style="font-size:10pt;font-family:"Courier New";color:black">, [],[],</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'auto'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); %Load your
main data</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = pop_epoch( EEG, {<span style>  </span>}, [0<span style> 
</span>1], </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'newname'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'EGI file epochs'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'epochinfo'</span><span style="font-size:10pt;font-family:"Courier New";color:black">, </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'yes'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); % epoch your main data</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">[ALLEEG EEG CURRENTSET] =
pop_newset(ALLEEG, EEG, 2,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'gui'</span><span style="font-size:10pt;font-family:"Courier New";color:black">,</span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">'off'</span><span style="font-size:10pt;font-family:"Courier New";color:black">); </span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = eeg_checkset( EEG );</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:12pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal">% Baseline correct your data – ALLEEG(1) is your baseline data
set and ALLEEG(2) your epoched main data set </p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10pt;font-family:"Courier New";color:black"> i = 1:size(ALLEEG(2).data,3) % number of epochs</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black"><span style>    </span></span><span style="font-size:10pt;font-family:"Courier New";color:blue">for</span><span style="font-size:10pt;font-family:"Courier New";color:black"> j = 1:size(ALLEEG(2).data,2) % number of samples in each epoch</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black"><span style>        </span>ALLEEG(2).data(:,j,i) = ALLEEG(2).data(:,j,i)-
ALLEEG(1).data;</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black"><span style>    </span></span><span style="font-size:10pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:blue">end</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">%</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">EEG = eeg_checkset( EEG );</span><span style="font-size:10pt;font-family:"Courier New";color:forestgreen">% this is
THE BASELINE CORRECTED DATA</span><span style="font-size:12pt;font-family:"Courier New""></span></p>

<p class="MsoNormal" style="margin-bottom:0.0001pt;line-height:normal"><span style="font-size:10pt;font-family:"Courier New";color:black">eeglab </span><span style="font-size:10pt;font-family:"Courier New";color:rgb(160,32,240)">redraw</span><span style="font-size:12pt;font-family:"Courier New""></span></p>


<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Nov 17, 2013 at 12:51 AM, Makoto Miyakoshi <span dir="ltr"><<a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear <span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px">Aleksandra,</span><div>
<span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px"><br></span></div><div><span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px">It's unfortunate but I have to say that volunteers didn’t really relax and you plot their data as if they were 'relaxed' is not correct. In other words analysis does not help design deficit.</span><br>


</div><div><span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px"><br></span></div><div><span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px">Try to find another way to view the data. There could be other possibilities! Did you try common baseline option by the way (see recent post about it; Arno gave it a detailed explanation).</span></div>


<div><span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px"><br></span></div><div><span style="font-family:Calibri,sans-serif;font-size:14.666666984558105px">Makoto</span></div></div><div class="gmail_extra">


<br><br><div class="gmail_quote">2013/11/15 Stephen Politzer-Ahles <span dir="ltr"><<a href="mailto:politzerahless@gmail.com" target="_blank">politzerahless@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr"><div><div><div>Hi Aleksandra,<br><br></div>I don't think there are any built-in functions for EEGLAB for this, but it should be easy to do with some MATLAB scripting. But you would need to provide more information about specifically what you need done (i.e., how are the trials in your experiment organized, are you wanting for each trial of condition A to be baseline-corrected to the previous trial of condition B, or baseline-correct the average of one condition to the average of another, or what?). I am not sure if this is common practice, though.<br>



<br></div>Best,<br></div>Steve<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div><div><br></div>Stephen Politzer-Ahles<br>New York University, Abu Dhabi<br>Neuroscience of Language Lab<br>



<a href="http://www.nyu.edu/projects/politzer-ahles/" target="_blank">http://www.nyu.edu/projects/politzer-ahles/</a><br></div></div>
<br><br><div class="gmail_quote"><div><div>On Thu, Nov 14, 2013 at 1:37 PM, Aleksandra Vuckovic <span dir="ltr"><<a href="mailto:Aleksandra.Vuckovic@glasgow.ac.uk" target="_blank">Aleksandra.Vuckovic@glasgow.ac.uk</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal">HI<u></u><u></u></p>

<p class="MsoNormal">We are analysing two conditions recorded during the same session on the same group of volunteers,  and would like to calculate ERSP for each condition. It seems however that volunteers didn’t really relax in between trials in one of the experimental condition (many of them continued with the experimental task)  so we’d like to use the baseline of one condition on both conditions. Can anyone advise is how to do it?<u></u><u></u></p>



<p class="MsoNormal">Many thanks,<u></u><u></u></p><p class="MsoNormal">Aleksandra<u></u><u></u></p></div></div><br></div></div>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br></div>
<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>

-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div>
</font></span></div>
<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br></div>