s="keyword">if</span> exist(<span class="string">'DownSample'</span>,<span class="string">'var'</span>) &amp; DownSample &gt; 1
0056                 fprintf(<span class="string">'Downsampling by factor %i\n'</span>,DownSample)
0057                 RefData=resample(Data,1,DownSample);
0058             <span class="keyword">else</span>
0059                 RefData=Data;
0060             <span class="keyword">end</span>
0061             RefHeader=Header;
0062             clear Data Header
0063         <span cl