;
0012 nsamples=1000;
0013 ntrials=100;
0014 nchans=10;
0015 
0016 <span class="comment">% sinusoidal pulse with random phase</span>
0017 CF1=4;
0018 target=sin(2*pi*0.5*(1:nsamples)'/sr).^2;
0019 target=repmat(target,[1,1,ntrials]) .* <span class="keyword">...</span>
0020     sin( 2*pi*(CF1*repmat((1:nsamples)',[1,1,ntrials])/sr + <span class="keyword">...</span>
0021     repmat(rand(1,1,ntrials),[nsamples,1,1]))); <span class="comment">% phase</span>
0022 target=nt_normcol(target);
0023 
0024 <span class=