
|
  
Downsampling (Matlab / Octave function) Summary | Downsampling removes samples from the signal. In combination with a filter, it can be part of decimation. |   Discussion of upsampling, downsampling, interpolation, decimation. Note that the terms are used inconsistently in literature, and may depend on the context in casual discussion. |
Matlab function mn_downsample.m Usage | data=mn_downsample(data, factor) | Source code function data=mn_downsample(data, factor)
[nRow, nCol]=size(data);
if nRow > 1
error('need row vector');
end
dsize=ceil(nCol/factor);
nz=dsize*factor-nCol;
if nz > 0
data=[data, zeros(1, nz)];
end
data=reshape(data, factor, dsize);
data=data(1, :);
data=data(1:dsize);
  
© Markus Nentwig 2007-2008
The content of this page is provided without any warranty and may not be reproduced without permission.
Comments? Questions?
Please send me a mail!
mnentwig@elisanet.fi
|