
function z=example2_ff(y)
z=zeros(6,1);
global ex_ it_ recur_

global alpha beta beta delta psi rho tau theta 
z(1) = exp(y(6))*theta*exp(y(7))^(1+psi) -((1-alpha)*exp(y(9)));
z(2) = exp(y(8)) -(beta*(((exp(y(5))*exp(y(6)))/(exp(y(10))*exp(y(11))))*( ...
exp(y(10))*alpha*exp(y(12))+(1-delta)*exp(y(8)))));
z(3) = exp(y(9)) -(exp(y(4))*(exp(y(3))^alpha)*(exp(y(7))^(1-alpha)));
z(4) = exp(y(8)) -(exp(y(5))*(exp(y(9))-exp(y(6)))+(1-delta)*exp(y(3)));
z(5) = y(4) -(rho*y(1)+tau*y(2)+ex_(it_-1,1));
z(6) = y(5) -(tau*y(1)+rho*y(2)+ex_(it_-1,2));
