function y = PFilter1Hz(x)
%PFILTER1HZ Filters input x and returns output y.

% MATLAB Code
% Generated by MATLAB(R) 8.4 and the DSP System Toolbox 8.7.
% Generated on: 16-Feb-2016 11:38:35

%#codegen

% To generate C/C++ code from this function use the codegen command. Type
% 'help codegen' for more information.

persistent Hd;

if isempty(Hd)
    
    % The following code was used to design the filter coefficients:
    % % FIR Window Lowpass filter designed using the FIR1 function.
    %
    % % All frequency values are in Hz.
    % Fs = 1;  % Sampling Frequency
    %
    % N    = 10;       % Order
    % Fc   = 0.02;     % Cutoff Frequency
    % flag = 'scale';  % Sampling Flag
    %
    % % Create the window vector for the design algorithm.
    % win = blackmanharris(N+1);
    %
    % % Calculate the coefficients using the FIR1 function.
    % b  = fir1(N, Fc/(Fs/2), 'low', win, flag);
    
    Hd = dsp.FIRFilter( ...
        'Numerator', [1.57246287686607e-05 0.00294876425891433 ...
        0.0281799141639923 0.106973234459911 0.221807456935806 0.280149811105215 ...
        0.221807456935806 0.106973234459911 0.0281799141639923 ...
        0.00294876425891433 1.57246287686607e-05]);
end

y = step(Hd,x);


% [EOF]
