0001 function vb_plot_max_ratio_image(ratio,thred_val,thred_max)
0002
0003
0004
0005
0006
0007 if nargin < 2, thred_val = [5:10]; end;
0008
0009 if nargin < 3, thred_max = max(thred_val) + 0.1;end;
0010
0011 Nthre = length(thred_val);
0012
0013 [Nch, Ntry] = size(ratio);
0014
0015
0016 ratio = min(ratio,thred_max);
0017
0018
0019 if Nthre==1,
0020 ratiov = zeros(Nch, Ntry);
0021
0022 ix = find(ratio > thred_val);
0023 ratiov(ix) = ratio(ix);
0024
0025 image(ratiov, 'CDataMapping','scaled');
0026 xlabel('Trials')
0027 ylabel('Channels')
0028 return
0029 end
0030
0031
0032 NYfig=2;
0033 NXfig=ceil(Nthre/NYfig);
0034 nfig = 1;
0035 figure;
0036
0037 for n=1:Nthre
0038 subplot(NYfig,NXfig,nfig); nfig = nfig + 1;
0039 ratiov = zeros(Nch, Ntry);
0040
0041 ix = find(ratio > thred_val(n));
0042 ratiov(ix) = ratio(ix);
0043
0044 image(ratiov, 'CDataMapping','scaled');
0045 title(sprintf('Threshold=%5.1f',thred_val(n)))
0046 end
0047
0048 subplot(NYfig,NXfig,NXfig+1);
0049 xlabel('Trials')
0050 ylabel('Channels')
0051