function [outputSequence internalResponse esn] = runNetwork(steps, esn)
%runNetwork vypocita steps krokov siete
%Vysledkom je vystupna sekvencia outputSequence, ktora zodpoveda vystupu
%siete a internalResponse je odozva jednotlivych neuronov v case


internalResponse = zeros(length(esn.x), steps);

for i = 1:steps
     %save the n - th output to outputSequence
    internalResponse(:,i) = esn.x;
    outputSequence(i) = esn.y; 
    
    % calculate x(n + 1)
    esn.x = unitFunction(esn.resWeights * esn.x + esn.feedbackWeights * esn.y);
    % calculate y(n + 1)
    esn.y = esn.outWeights * esn.x; %unitFunction(); 
end