function y = preemphasis(x, alfa)

% y = preemphasis(x, alfa)
%
% This function performs preemphasis (high-pass) filtration
% x     - input signal
% alfa  - filter coef. (defaultne 0.92)
% y     - output, filtered signal

%% Input variables check
if ((nargin < 2) || (isempty(alfa)))
    alfa = 0.92;
end

%% Preemphasis filtration
y = filter([1 -alfa], [1 0], x);