<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 style><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, <br>Katherine</p><div><br></div>-- <br><div class="gmail_signature"><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>(905) 525-9140 ext. 26755</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>
</div>