<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Andrew,<div><br></div><div>yes, there was a typo, it should be 10.^<span class="Apple-style-span" style="font-family: Arial; ">(specdata{index}/10) and not </span>10^<span class="Apple-style-span" style="font-family: Arial; ">(specdata{index}/10).</span></div><div><span class="Apple-style-span" style="font-family: Arial; ">Sorry about that,</span></div><div><span class="Apple-style-span" style="font-family: Arial; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial; ">Arno</span></div><div><br><div><div>On 29 Nov 2012, at 23:28, Andrew Hill wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Arno or any other helpful soul - I'm replying in Christian's thread as I'm trying to do something similar.<div><br></div><div>Using the code snippets Arno provided, to convert specdata from log back into amplitude produces this error:</div><div><br></div><div><!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<span class="Apple-style-span" style="font-family: Arial; ">[STUDY specdata specfreqs] = std_specplot(STUDY, ALLEEG,'channels', ('C3'} , 'plotsubjects','off', 'freqrange', [0.5 40]</span><span class="Apple-style-span" style="font-family: Arial; ">);</span></div><div><span class="Apple-style-span" style="font-family: Arial; "><br></span></div><div><!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<div style="font-family: Arial; "><!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<div>for index = 1:length(specdata(:));</div><div>specdata{index} = sqrt(10^(specdata{index}/10));</div><div>end;</div><div><br></div></div></div><div><div>??? Error using ==> mpower</div><div>Inputs must be a scalar and a square matrix.</div><div> </div><div><br></div><div>My specdata is in a 4x2 cell array of 159 x 25 doubles (holding 159 quarter-hz bins for 25 subjects).</div><div>Is there a different way to call the math against the cell array so that it converts back to amplitude?</div><div><br></div><div>Thanks,</div><div>Andrew</div><div><br></div><div><br></div><div><br></div><div><div>On Jul 5, 2012, at 9:55 PM, Arnaud Delorme wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Christian,<div><br></div><div>yes, you are getting 10*log10(power) in these plots which is the usual way of visualizing EEG data.</div><div>You may recuperate the data values on the command line</div><div><br></div><div><i>[STUDY specdata freqs] = std_specplot(STUDY, ALLEEG, 'channels', { 'Cz' });</i></div><div><br></div><div>and convert the data back to absolute power values and visualize the data</div><div><br></div><div><i>for index = 1:length(specdata(:))</i></div><div><i><span class="Apple-tab-span" style="white-space:pre">       </span>specdata{index} = 10^(specdata{index}/10);</i></div><div><i>end;</i></div><div><i>std_plotcurve(freqs, specdata);</i></div><div><br></div><div>Note, if you want amplitude not power, use instead <i>specdata{index} = 10^(specdata{index}/20);</i><i> </i>or <i>specdata{index} = sqrt(10^(specdata{index}/10)); </i>which is equivalent.</div><div>Best,</div><div><br></div><div>Arno</div><div><br><div><div>On May 7, 2012, at 12:56 AM, Christian Scharinger wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Dear eeglab users,<br><br>I use the following code for calculating the spectrum in a STUDY design:<br><br>[STUDY ALLEEG] = std_precomp(STUDY, ALLEEG, 'channels', 'design', [1], <br>'erp', 'off', 'spec', 'on', 'ersp', 'off', 'specparams', { 'specmode', <br>'psd', 'recompute', 'on', 'timerange', [1300 1800], 'freqfac', [4] }, <br>'savetrials', 'off');<br><br>STUDY = pop_specparams(STUDY, 'groupstats','on', 'mcorrect','fdr', <br>'threshold',0.05,'plotgroups','together','freqrange',[1 30], <br>'rmsubjmean', 'off');<br><br>With this code, I'm getting negative power values when I use the <br>std_specplot function for plotting (or when I do the plotting via GUI).<br><br>So I guess I'm not getting absolute power values (what I would like to <br>have) but power values in relation to some kind of baseline.<br><br>Is it possible to get absolute power values for a spectrum in a STUDY <br>design?<br>Where can I see/change what baseline eeglab uses for calculating power <br>values?<br><br>Many thanks in advance,<br><br>Christian<br><br><br><br>-- <br>Christian Scharinger, M.A.<br><br>Knowledge Media Research Center (KMRC)<br>Schleichstraße 6 | 72076 Tuebingen<br><br>Phone: +49 (0)7071 979-360<br>Internet: <a href="http://www.iwm-kmrc.de/c.scharinger">http://www.iwm-kmrc.de/c.scharinger</a><br>E-Mail: <a href="mailto:c.scharinger@iwm-kmrc.de">c.scharinger@iwm-kmrc.de</a><br><br>_______________________________________________<br>Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">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></div></blockquote></div><br></div></div>_______________________________________________<br>Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html">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></blockquote></div><br></div></div></blockquote></div><br></div></body></html>