function [I] = Plant2(i,t,I);   

scale = 1.0;
offset = .0; %0.05;
Noise = 0;

N=3;
if(i > N)
  I(i,5) = (sum(I(i-N+1:i-1,5))+I(i-1,4))/N;
else
  I(i,5) = I(i,4);
end

I(i,5) = I(i,5)*scale+offset+Noise*(rand-.5)*2;

I(i,3)=I(i,2)+I(i,5);

end

