function rate = second_order_step_rate (t, y, tau, zeta, gain, sens, step)
% this function supplies a vector of 2 derivatives to an ODE integration routine
% A typica 2nd-order equation is decomposed into two equations
% y(1) is the response variable itself and y(2) is its derivative

% thus rate = [dy/dt ;...        or = [dy(1) ;...
%              d2y/dt2 ]               dy(2) ]

% input arguments tau and following are user-selected
rate = [y(2) ; ...
        (gain*step - y(1) - 2*zeta*tau*y(2))/tau^2 ];
