0001 function plotsig(C,sig,t,f,c)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 if nargin < 4; error('Need at least 4 arguments'); end;
0012 if nargin < 5 | isempty(c); c='b'; end;
0013 [T,F]=size(C);
0014 if F==1; C=C'; [T,F]=size(C);end;
0015 if T~=length(t) | F~=length(f);
0016 error('frequency and/or time axes are incompatible with data');
0017 end;
0018 if T==1;
0019 dim=max(T,F);
0020 C=C(:);
0021 indx=find(C>sig);
0022 plot(f,C,c);
0023
0024 line(get(gca,'xlim'),[sig sig]);
0025 xlabel('f'); ylabel('|C|');
0026 else
0027 mask=zeros(T,F);
0028 for n=1:length(t);
0029 for m=1:length(f);
0030 if C(n,m)>sig
0031 mask(n,m)=1;
0032 end;
0033 end;
0034 end;
0035 imagesc(t,f,(mask.*C)'); axis xy; colorbar
0036 xlabel('t'); ylabel('f');
0037 end;