function y = Vfilter3(x)
%VFILTER3 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:22:07

%#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:
    % % Equiripple Differentiator filter designed using the FIRPM function.
    %
    % % All frequency values are in Hz.
    % Fs = 0.3333;  % Sampling Frequency
    %
    % N = 8;                    % Order
    % F = [0 0.02 0.022 0.16];  % Frequency Vector
    % A = [0 1 0 0];            % Amplitude Vector
    % W = [1 1];                % Weight Vector
    %
    % % Calculate the coefficients using the FIRPM function.
    % b  = firpm(N, F/(Fs/2), A, W, 'differentiator');
    
    Hd = dsp.FIRFilter( ...
        'Numerator', [-0.122716548251679 0.551475730304867 0.117102527810167 ...
        0.023487536789256 0 -0.023487536789256 -0.117102527810167 ...
        -0.551475730304867 0.122716548251679]);
end

y = step(Hd,x);


% [EOF]
