function dxdts = sec_ord(t,x,params) % dxdts is the column vector of the first order differential equations % We pass in the parameters for z and wn in the vector params z = params(1); wn = params(2); dxdts = zeros(2,1); dxdts(1) = x(2); dxdts(2) = -(2*z*wn*x(2) + wn^2*x(1));