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);
% g1=params(3);
% g3=params(4);
% 
% dy = [    -alfa*y(1) + alfa*y(2) - alfa*(-g1*y(1)+g3*y(1)*y(1)*y(1)) 
%           y(1) - y(2) + y(3) 
%           -beta*y(2) ];

% 2 Chua csatolás
if nargin < 3; params= [9.5 15 8/7 4/63 0.1]; end
if nargin < 2; y = zeros(6,1); end
if nargin < 1; t = 0; end

alfa=params(1);
beta=params(2); 
g1=params(3); % konduktancia1
g3=params(4); % konduktancia2
gcs=params(5); % csatolás

dy = [    -alfa*y(1) + alfa*y(2) - alfa*(-g1*y(1)+g3*y(1)*y(1)*y(1)) 
          y(1) - y(2) + y(3) + gcs*(y(5)-y(2))
          -beta*y(2)
          -alfa*y(4) + alfa*y(5) - alfa*(-g1*y(4)+g3*y(4)*y(4)*y(4)) 
          y(4) - y(5) + y(6) + gcs*(y(2)-y(5))
          -beta*y(5)                         ]; 
 