%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Project : The function of 1st Order Low-Pass Filter
% Version : 1.00a
% Date : 2011.05.11
% Explanation : 1st order LPF, Reference : A-Jin , Application of KalmanFilter
% Author : Yoon JaWoong
% CopyRight : MILab
% alpha = weighting factor , x = input data
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function xlpf = LPF(alpha, x)
%
%
persistent prevX
persistent firstRun
if (alpha < 0 | alpha >1)
fprintf('alpha °ªÀÇ ¹üÀ§¸¦ È®ÀÎÇÏ¼¼¿ä. 0