function [y,u,e,A,B,D,E,C,F,x] = linex2n2(STDE,iu,nt);
%        [y,u,e,A,B,D,E,C,F,x] = linex2n2(STDE,iu,nt);
%---------------- linex2.m   nx = 3 ny = 2 nu = 2-----------------
% 3/3-97

%u = [utype(nt,iu),utype(nt,1)+utype(nt,5)];
u = [utype(nt,iu),utype(nt,5)];

%u(2,2)=0;
%t=0:nt-1;t=t';
%us1=ones(nt,1);us1(1)=0;us2=ones(nt,1)*2;us2(1:2)=zeros(2,1);
%u=[sin(t)+us1,sin(t/3)+us2];

p=1.1765;
A  = p*[1.5,1.0,0.1;-0.7,0.0,0.1;0,0,0.85];
B  = [0.0 0.0;0.0 1.0;1.0 0.0];
C  = [0.0 0.1;0.1 0.0;0.0 0.2];
D  = [3.0,0.0,-0.6;0.0,1.0 1.0];
E  =-eye(2)*0;
F  = eye(2);
x0 = [0;0;0];
DELTA = sqrt(STDE);

% rand('seed',0);       % Resets seed to 0

[ny,nx] = size(D);

e = randn(nt,ny)*DELTA;
Bt= [B,C];
Et= [E,F];

[y,x] = dlsim(A,Bt,D,Et,[u,e],x0);
