function dfdx = vdpStateJacobianFcn(xk) 
% vdpStateJacobianFcn Jacobian of vdpStateFcn (a discrete approximation to
% van der Pol ODEs for mu=1, with sample time 0.05s)
%
% dfdx = vdpStateJacobianFcn(xk)
%
% Inputs:
%    xk - States x[k]
%
% Outputs:
%    dfdx - df/dx, the Jacobian of vdpStateFcn evaluated at x[k]
%
% See also vdpStateFcn, extendedKalmanFilter, unscentedKalmanFilter

%   Copyright 2016 The MathWorks, Inc.

%#codegen

% The tag %#codegen must be included if you wish to generate code with 
% MATLAB Coder.

dt = 0.05; % [s] Sample time
dfdx = [1                    dt;
        dt*(-1-2*xk(1)*xk(2))  1+dt*(1-xk(1)^2)];
end