% Simulate system in Exercise 15
%

A=[1.5 1;-0.7 0]; B=[2;-1.3]; C=[0.5;0.3]; D=[1,0]; E=-1;

% Simulate the model and generate data files Y og U.
N=1000;
k=1:N; k=k';
U=sin((k-1)/5)+sin((k-1)/10);

randn('seed',0);
e=randn(N,1);

x0=[0;0];
Y=dlsim(A,[B C],D,[E 1],[U e],x0);

% The Y and U data should now be the same as those on the files
% uov9.dat and yov9.dat