function y = PFilter3(x)
%PFILTER3 Filters input x and returns output y.

% MATLAB Code
% Generated by MATLAB(R) 8.4 and the DSP System Toolbox 8.7.
% Generated on: 03-Feb-2016 08:17:52

%#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 = 0.333;  % 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', [8.81131298055604e-06 0.00211708177469335 ...
        0.0240149216743935 0.102119533086314 0.225973798612221 0.291531707078795 ...
        0.225973798612221 0.102119533086314 0.0240149216743935 ...
        0.00211708177469335 8.81131298055604e-06]);
end

y = step(Hd,x);


% [EOF]
