function y = MatlabLPF(x)
%MATLABLPF Filters input x and returns output y.

%
% MATLAB Code
% Generated by MATLAB(R) 8.0 and the DSP System Toolbox 8.3.
%
% Generated on: 28-May-2013 09:14:07
%

persistent Hd;

if isempty(Hd)
    
    Fpass = 2;   % Passband Frequency
    Fstop = 4;   % Stopband Frequency
    Apass = 1;   % Passband Ripple (dB)
    Astop = 60;  % Stopband Attenuation (dB)
    Fs    = 10;  % Sampling Frequency
    
    h = fdesign.lowpass('fp,fst,ap,ast', Fpass, Fstop, Apass, Astop, Fs);
    
    Hd = design(h, 'butter', ...
        'MatchExactly', 'stopband', ...
        'SOSScaleNorm', 'Linf');
    
    
    
    set(Hd,'PersistentMemory',true);
    
end

y = filter(Hd,x);


% [EOF]
