function y=lsim_lab2(x,t);
% FUNCTION  y=lsim_lab2(x,t)
%
% Short simulation of the linear system in Lab 2.
% t is a vector of uniform time samples
% x is the input signal at those time points
% y is the output at those time points
% The system is assumed to be initially at rest

y(1)=0;

Delta_t=t(2)-t(1);

y_coeff= 1-3*Delta_t;

for k=2:length(t), 

  y(k)=Delta_t*x(k-1) + y_coeff*y(k-1);

end;

