function [u] = utype(N,iu)
% utype.m  generate different input experiment signals.
% u = utype(N,iu)
% 
% iu = 0  VanOvers signal presented in paper
% iu = 1  step 0 - 2
% iu = 2  sum of 4 sinus
% iu = 3  random signal
% iu = 4  u = sin(t)       
% iu = 5  correct implementation of iu=2, i.e.
%         u = (sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1))*0.2;
% iu = 6  u = sin(t/5) + sin(t/10)
% iu = 7  u = (sin(t/21) + sin(t/14) + sin(t/7) + sin(t/3));
% iu = 8  u = sin(t/28)+sin(t/21) + sin(t/14) + sin(t/7) + sin(t/3) + sin(3*t);
% iu = 9  u = sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1)+sin(5*t);
% iu = 10 u = sin(t/10) + sin(t/5) + sin(t/1);
% iu = 11 u = sin(t/14) + sin(t/7) + sin(t/3);


if iu == 0,
%rand('normal')
%rand('seed',0)
 u = randn(N,1)*sqrt(100);
% [b,a] = butter(2,0.05);
 b=[0.0055,0.0111,0.0055];
 a=[1 -1.7786 0.8008];
 u = filter(b,a,u)  + randn(N,1)*0.1;

elseif iu == 1,
   u = ones(N,1);
   u(1) = 0;
elseif iu == 2,
   t = 1:N;
   t = t';
   u = (sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1))*0.2;
   u(1) = 0;
%  u(t) = (sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1))*0.2;
%  end
%  u = u';
elseif iu == 3,
%  rand('normal')
   randn('seed',1)
   u = randn(N,1);
elseif iu == 4
   t = 0:N-1;
   u = sin(t);
   u = u';
elseif iu == 5,
   t = 0:N-1;
   t = t';
   u = (sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1))*0.2;
elseif iu == 6,
   t = 0:N-1;
   t = t';
   u = sin(t/10) + sin(t/5);
elseif iu == 7,
   t = 0:N-1;
   t = t';
   u = (sin(t/21) + sin(t/14) + sin(t/7) + sin(t/3));
elseif iu == 8,
   t = 0:N-1;
   t = t';
   u = sin(t/28)+sin(t/21) + sin(t/14) + sin(t/7) + sin(t/3) + sin(3*t);
elseif iu == 9,
   t = 0:N-1;
   t = t';
   u = sin(t/25) + sin(t/10) + sin(t/5) + sin(t/1)+sin(5*t);
elseif iu == 10,
   t = 0:N-1;
   t = t';
   u = sin(t/10) + sin(t/5) + sin(t/1);
elseif iu == 11,
   t = 0:N-1;
   t = t';
   u = sin(t/14) + sin(t/7) + sin(t/3);
end


