Applying a window to input signal
% copy and paste into matlab command line

% say you vector is this:

a = randn(100, 1);

% you take out these small values:
threshold = 0.3;
a = a(abs(a) &gt; threshold); % or try a(abs(a)&lt;threshold) = [];