% cubic function
% ---------------------------------------
         function [dxdt] = fcubic(x)
         global a c
         dxdt=-x*(x-a)*(x-1)+c;