% Problem 3.10
disp('Problem 3.10')
disp(' ')
disp('States space model')
num=1;
den=[1 0 1];
[A,B,C,D]=tf2ss(num,den)
x0=[1; 0]

%Generate a sequence u=1,-1,1,-1,... of 20 elements
u=ones(20,1);
for i=2:2:20,
  u(i,1)=-1;
end
dlsim(A,B,C,D,u,x0)
