Home > NoiseTools > nt_varplot.m

nt_varplot

PURPOSE ^

varplot(x,mode) - plot variance maps (time*trials, time*chans, chans*trials)

SYNOPSIS ^

function varplot(x,mode)

DESCRIPTION ^

varplot(x,mode) - plot variance maps (time*trials, time*chans, chans*trials)

  x: data (time * channels * trials)
  mode: 0:imagescc (default), 1:plot

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function varplot(x,mode)
0002 %varplot(x,mode) - plot variance maps (time*trials, time*chans, chans*trials)
0003 %
0004 %  x: data (time * channels * trials)
0005 %  mode: 0:imagescc (default), 1:plot
0006 
0007 if nargin<2; mode=0; end
0008 
0009 if ~mode
0010 
0011 
0012     subplot 221; 
0013     imagescc(sqrt(nt_unfold(x.^2)));
0014     ylabel('unfolded time (samples)'); xlabel('channels');
0015 
0016     subplot 222; 
0017     imagescc(sqrt(squeeze(sum(x.^2,2))));
0018     ylabel('epoch time (samples)'); xlabel('trials');
0019 
0020     subplot 223; 
0021     imagescc(sqrt(squeeze(sum(x.^2,3))));
0022     ylabel('epoch time (samples)'); xlabel('channels');
0023 
0024     subplot 224; 
0025     imagescc(sqrt(squeeze(sum(x.^2,1))));
0026     ylabel('channels'); xlabel('trials');
0027 
0028 else
0029     
0030     subplot 221; 
0031     plot(sqrt(nt_unfold(x.^2)));
0032     xlabel('unfolded time (samples)'); title('channels') 
0033     
0034     subplot 222; 
0035     plot(sqrt(squeeze(sum(x.^2,2)))); title('trials')
0036     xlabel('epoch time (samples)'); 
0037 
0038     subplot 223; 
0039     plot(sqrt(squeeze(sum(x.^2,3)))); title('channels')
0040     xlabel('epoch time (samples)'); 
0041 
0042     subplot 224; 
0043     plot(sqrt(squeeze(sum(x.^2,1)))'); title('channels')
0044     xlabel('trials'); 
0045     
0046 end
0047

Generated on Mon 28-Nov-2016 20:12:47 by m2html © 2005