plot_scl_stat
PURPOSE
[t_thresh,p_thresh,thresh_map]=plot_scl_stat(t_out,p_out,scl_frq,scl_time,mn1,mn2,p_crit,thresh_crit);
SYNOPSIS
function [t_thresh,p_thresh,thresh_map]=plot_scl_stat(t_out,p_out,scl_frq,scl_time,mn1,mn2,p_crit,thresh_crit);
DESCRIPTION
CROSS-REFERENCE INFORMATION
This function calls:
This function is called by:
SOURCE CODE
0001 function [t_thresh,p_thresh,thresh_map]=plot_scl_stat(t_out,p_out,scl_frq,scl_time,mn1,mn2,p_crit,thresh_crit);
0002
0003
0004
0005
0006
0007
0008
0009 [sz_frq,sz_time]=size(t_out);
0010
0011 if nargin<3
0012 scl_frq=1:sz_frq;
0013 end
0014 if nargin<4
0015 scl_time=1:sz_time;
0016 end
0017 if nargin<5
0018 skip=1;
0019 end
0020 if nargin<7
0021 p_crit=.05;
0022 end
0023 if nargin<8
0024 thresh_crit=0;
0025 end
0026
0027 if thresh_crit==1
0028 mnb=mean(mn1+mn2,3);
0029 mnb2=reshape(mnb,sz_frq*sz_time,1);
0030 tcr=find(mnb2>((-.5*std(mnb2))+mean(mnb2)));
0031 thresh_map=zeros(sz_frq,sz_time);
0032 thresh_map(tcr)=ones(size(tcr));
0033
0034
0035
0036 else
0037 thresh_map=ones(sz_frq,sz_time);
0038 end
0039
0040 x=find(abs(p_out)<p_crit);
0041 t_thresh=zeros(sz_frq,sz_time);
0042 t_thresh(x)=t_out(x);
0043 t_thresh=t_thresh.*thresh_map;
0044 cr1=t_thresh~=0;
0045 p_thresh=p_out.*cr1;
0046
0047
0048 figure
0049 pcolor(scl_time,scl_frq,mn1);
0050
0051 [cmin,cmax]=caxis;
0052 v=[cmin cmax];
0053 title('cond1');
0054
0055 figure
0056 pcolor(scl_time,scl_frq,mn2);
0057
0058 caxis(v);
0059 title('cond2');
0060
0061 figure
0062 pcolor(scl_time,scl_frq,t_thresh);
0063
0064 [cmin,cmax]=caxis;
0065 v=[cmin cmax];
0066 mxv=max(abs(v));
0067 v=[-mxv mxv];
0068 caxis(v);
0069 title('stats cond1<>cond2 (t-value)');
0070
Generated on Mon 22-May-2023 06:53:56 by m2html © 2005