function [nos ir output esn] = simpleSine()
%simpleSine Testing script
%  Detailed explanation goes here


nSeqLength = 5000;
%output = sin((1:nSeqLength) / 4) / 2;
%output = output ;

output = sineGenerator(1:nSeqLength, 500, 25) / 2;
%output = zeros(1, nSeqLength);
%output = output + 5;
%output = modulatedSineGenerator(1:nSeqLength, 500, 10, 20) / 2;

teacher = output(1:nSeqLength);

esn = create_esn(50, 1, 15, 0.82);
%esn = scaling(esn, 0.5);

%max(abs(eig(esn.resWeights)))

%initial run

%[nos ir esn] = runNetwork(100, esn);
%figure(1);
%plot(1:100, nos(1:100));

%figure(1);
%plot(1:50, ir(1:5, 1:50));

% online train network
[nos ir error esn] = online_train(teacher', 0.3, esn);
%[nos ir error esn] = online_train(teacher', 0.3, esn);
%[nos ir error esn] = online_train(teacher', 0.3, esn);

%[nos ir error esn] = online_train(teacher', 0.01, esn);
%[nos ir esn] = train(teacher, esn);
figure(2);
plot(1:length(teacher), ir(1:5, 1:length(teacher)));
figure(3);
plot(1:length(error), error(1:length(error)));

% test run

[nos2 ir esn] = runNetwork(2000, esn);
figure(4);
plot(1:length([nos nos2(1:2000)]), [nos nos2(1:2000)]);


%starting from another random state
%esn.x = rand(1, size(esn.x))' - 0.5;
%[nos ir esn] = runNetwork(100, esn);

%figure(2);
%plot(1:100, nos(1:100));


%plot(1:nSeqLength, output);

%[nos ir esn] = processInput(nSeqLength, esn);
%[nos ir esn] = train(output(1:300), esn);
%plot(1:nSeqLength - 50, nos);


%[nos2 ir esn] = processInput(200, esn);
%plot(1:nSeqLength + 150, [nos nos2]);