<div dir="ltr">Actually, because I implemented something like that once, but didn’t use squeeze what would the added value of squeeze be? I looked into the doc of that function but I’m not sure I understand what it does.<div>

<br></div><div>Makoto, do you have a better way of explaining it than the matlab doc on squeeze()?</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">–<br>Bastien Boutonnet, Ph. D.<div>Department of Psychology</div>

<div>University of Wisconsin, Madison</div><div><a href="http://bastienboutonnet.com" target="_blank">bastienboutonnet.com</a></div></div></div>
<br><br><div class="gmail_quote">On 24 March 2014 20:12, 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 Gaspar,<div><br></div><div>Without checking it with Matlab...</div><div>To make it simple, I'll use millisecond instead of datapoints.</div><div><br></div><div>channelOfInterest = 10; % let's say you want to see Ch10.</div>



<div>maxPoint = squeeze(max(EEG.data(channelOfInterest,300:800,:),[],2));<br></div><div>minPoint = squeeze(max(EEG.data(channelOfInterest,maxPoint:1300,:),[],2)); % Does this work? If not (and probably not), use for simple for loop, like</div>



<div><br></div><div>minPoint = zeros(1,length(maxPoint));</div><div>for n = 1:length(maxPoint)</div><div>minPoint(n) = squeeze(max(EEG.data(channelOfInterest,maxPoint(n):1300,:),[],2));</div><div>end <br></div><div><br></div>



<div>meanMaxValue = squeeze(mean(EEG.data(channelOfInterest,maxPoint-50:maxPoint+50,:),2));</div><div>meanMinValue = squeeze(mean(EEG.data(channelOfInterest,maxPoint-50:minPoint+50,:),2));<br></div><div><br></div><div>Let me know if this does not work.</div>



<div><br></div><div>Makoto</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-24 10:21 GMT-07:00 Bastien Boutonnet <span dir="ltr"><<a href="mailto:bastien.b1@gmail.com" target="_blank">bastien.b1@gmail.com</a>></span>:<div>

<div class="h5"><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Do you basically want to collect the maxima and then average over those maximums? </div><div class="gmail_extra">



<br clear="all"><div><div dir="ltr">–<br>Bastien Boutonnet, Ph. D.<div>Department of Psychology</div>

<div>University of Wisconsin, Madison</div><div><a href="http://bastienboutonnet.com" target="_blank">bastienboutonnet.com</a></div></div></div>
<br><br><div class="gmail_quote"><div><div>On 24 March 2014 05:44, Gaspar Lukacs <span dir="ltr"><<a href="mailto:lkcsgaspar@gmail.com" target="_blank">lkcsgaspar@gmail.com</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 dir="ltr">Hi all,<br><br>I have problems with data extraction from single epochs, for which I'll probably need an algorithm. Specifically, within each epoch, from 300 to 800 ms I need to get the maximum positive 100 ms segment average amplitude, and then from the midpoint of this segment to 1300 ms, the maximum negative 100 ms segment average.<br>






<br>The closest thing I could find is a "meanepoch.m" script which gets mean values between given latencies from single epochs - but it cannot search for maximum mean values (i.e. segment  averages)..<br><br>I would be very grateful for any suggestions.<br>






<br>Regards,<br>Gaspar<br><br>/Institute of Psychology, University of Szeged/</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><br></blockquote></div></div></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>
</blockquote></div><br></div>