function out = DuffingForced
out{2} = @fun_eval;
out{9} = [];

% --------------------------------------------------------------------------
function dydt = fun_eval(t,kmrgd,par_alpha,par_beta,par_gamma,par_delta,par_omega,par_z2)
dydt=[kmrgd(2);
par_gamma*kmrgd(3)-par_alpha*kmrgd(1)-par_delta*kmrgd(2)-par_beta*kmrgd(1)^3-par_z2*kmrgd(1)*kmrgd(1)*kmrgd(2);
-par_omega*kmrgd(4)+kmrgd(3)*(1-kmrgd(3)^2-kmrgd(4)^2);
par_omega*kmrgd(3)+kmrgd(4)*(1-kmrgd(3)^2-kmrgd(4)^2);];