ref="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function y=nt_decimate(x,R)</a>
0002 <span class="comment">%y=nt_decimate(x,R) - apply matlab decimate function to columns of matrix</span>
0003 <span class="comment">%</span>
0004 
0005 sz=size(x);
0006 m=sz(1);
0007 x=reshape(x,[m,prod(sz(2:end))]);
0008 
0009 y=zeros(ceil(m/R),prod(sz(2:end)));
0010 
0011 <span class="keyword">for</span> k=1:size(y,2);
0012     