% iterated Prediction
function [pred] = iterate_ffnet2(W1,B1,W2,B2,inp,PP);

 [Ni,Np] = size(inp);
 [Nh,TapsXNi] = size(W1);
 Taps = TapsXNi/Ni;

 pred = zeros(Ni,PP);
 predTMP = [inp pred];


 for k = 1:PP;
   inpP = predTMP(k-Taps+Np-1:k+Np-1);
   p1  = ffnet2(W1,B1,W2,B2,inpP);
   predTMP(:,k+Np) = p1(:,Taps+1);
 end

pred = predTMP(:,Np+1:Np+PP);


