<div dir="ltr">Dear Katherine,<div><br></div><div>Without running your code on the real Matlab, I think your code looks fine. I would add 'axis xy' in the end. I've never tried imagesc(x,y,C) so I don't know how log scale works... if your 'y' is already like logspace(log10(3), log10(55), 50) for 3-55Hz 50 divisions, just provide 'y' and it should work, no need to tweak further, I guess?</div><div><br></div><div>Makoto</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 7, 2015 at 11:26 PM, Katherine R. Naish <span dir="ltr"><<a href="mailto:naishek@mcmaster.ca" target="_blank">naishek@mcmaster.ca</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"><p style="font-size:12.8000001907349px">Hi all,</p><p style="font-size:12.8000001907349px">This is just a sanity-check (hopefully)...</p><p style="font-size:12.8000001907349px">I use the following code to average ersp values across electrodes (the 3rd dimension of 'erspdata'), calculate p-values for significance of modulation from baseline, and plot significant ersps for each region:</p><p><span style="font-size:12.8000001907349px">for reg=1:regions</span></p><p><span style="font-size:12.8000001907349px">erspdata_regions{1,1}(:,:,reg,:) = mean(erspdata{1,1}(:,:,(reg*chanlength) - (chanlength-1):reg*chanlength,:),3); %average across electrodes within region </span></p><p><span style="font-size:12.8000001907349px">pvals = std_stat({erspdata_regions{1,1}(:,:,reg,:) zeros(size(erspdata_regions{1,1}(:,:,reg,:))) }', 'condstats', 'on', 'mcorrect', 'fdr'); %significance of modulation</span></p><p><span style="font-size:12.8000001907349px">tmpersp = mean(erspdata_regions{1,1}(:,:,reg,:),4); % average across subjects</span></p><p><span style="font-size:12.8000001907349px">tmpersp(pvals{1}>0.05) = 0; % zero out non-significant values (without this line, plots all modulation)</span></p><p><span style="font-size:12.8000001907349px">subplot(regions/2,2,reg)</span></p><p></p><p><span style="font-size:12.8000001907349px">imagesc(ersptimes, erspfreqs, tmpersp, [zmin zmax]);</span></p><p><span style="font-size:12.8000001907349px">end</span></p><p style="font-size:12.8000001907349px">From what I understand, the 'imagesc' function takes the min and max values of 'erspfreqs' as the min and max values for the y-axis, but the yticks are evenly spaced between these values. So, where erspfreqs is on a log scale, the labels on the y-axis produced by imagesc are not accurate.</p><p style="font-size:12.8000001907349px">Is that correct?</p><p style="font-size:12.8000001907349px">Thank you, <span class="HOEnZb"><font color="#888888"><br>Katherine</font></span></p><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr">Katherine R. Naish<br>Social Brain, Body, & Action Lab<br>Department of Psychology, Neuroscience & Behaviour<br>McMaster University<br>Hamilton, ON, CA<div><a href="tel:%28905%29%20525-9140%20ext.%2026755" value="+19055259140" target="_blank">(905) 525-9140 ext. 26755</a></div><div><a href="https://www.researchgate.net/profile/Katherine_Naish" target="_blank">https://www.researchgate.net/profile/Katherine_Naish</a><br></div></div></div></div></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><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br></div></div>
</div></div>