b=1;
a=[1,1];
t=[0:.01:15]';
y_all=zeros(length(t),length(a));
x=ones(size(t)); %Input
clf
plot(t,x);
line(t,0.99);
hold on
xlabel('Time in seconds');
ylabel('Amplitude');

a_all=[.25, .5, 1, 1.5, 2];

for i=1:5
   a(1)=a_all(i);
   y=lsim(b,a,x,t); % output
   y_all(:,i)=y;
end

for i=1:5
   figure(1),plot(t,y_all,'r'), grid on 
   axis([0 15 0 1.5])
   ind=find(y<=.99)
end

	legend('Step', 'Response')
	

%part 2
x=sin(2*pi*t);