% % ex5F is a matlab function that defines the eulers % at the 'steady-state' for a simplified Kydland and Prescott model % function [q] = ex5F(x,gamma,alpha,psi,sigma,delta,beta,thetabar) % ----- define marginal utilities ----- % muc = x(1)^(-gamma) ; mul = psi*(1-x(2))^(-sigma) ; % ----- define marginal products ----- % mpn = (1-alpha)*thetabar*x(3)^(alpha)*x(2)^(1-alpha-1) ; mpk = (alpha)*thetabar*x(3)^(alpha-1)*x(2)^(1-alpha) ; % ----- define eulers ----- % r1 = muc - beta*muc*(mpk+(1-delta)) ; r2 = mul - muc*mpn ; % ----- define resource constraint ------ % r3 = thetabar*x(3)^(alpha)*x(2)^(1-alpha) - x(1) + (1-delta)*x(3) - x(3); % ----- define the equations to be returned ----- % q = [r1,r2,r3];