function dy = mysys(t,y,params)
    
% Chua
if nargin < 3; params= [9.5 15 8/7 4/63]; end
if nargin < 2; y = zeros(3,1); end
if nargin < 1; t = 0; end

alfa=params(1);
beta=params(2);
Rg1=params(3);
Rg3=params(4);

dy = [ -alfa*y(1)+alfa*y(2)-alfa*(-Rg1*y(1)+Rg3*y(1)^3)
        y(1)-y(2)+y(3)
        -beta*y(2) ];
          
