% % ex8 is a matlab file that solves % for the solutions of the rbc model % % ----- save output to file ----- % diary ex8.mout diary off delete ex8.mout diary ex8.mout % ----- display date and time of computation ----- % %format long date time0 = clock; % ----- define the parameters ----- % psi = .7/.3; alpha = 0.40; delta = 0.025; beta = 0.98; thetabar = 1; phi = 0.95; % ----- define steady states ----- % cbar = 0.8248; nbar = 0.2480; kbar = 9.3177; % ----- define parameters for solvem.m ----- % % ---- matrices for resource constraints and intratemporal euler (2nd row intra) ---- % AA = [-kbar; ... 0] ; BB = [(alpha)*thetabar*kbar^alpha*nbar^(1-alpha)+(1-delta)*kbar; ... -1/cbar*(1-alpha)*alpha*thetabar*kbar^alpha*nbar^(-alpha)]; CC = [-cbar, (1-alpha)*thetabar*kbar^alpha*nbar^(1-alpha); ... 1/cbar*(1-alpha)*kbar^alpha*nbar^(-alpha), ... psi*((1-nbar)^-2)*nbar-1/cbar*(1-alpha)*(-alpha)*thetabar*kbar^alpha*nbar^(-alpha) ]; DD = [thetabar*kbar^alpha*nbar^(1-alpha); ... -1/cbar*(1-alpha)*thetabar*kbar^alpha*nbar^(-alpha)]; % ---- matrices for intertemporal eulers ---- % FF = [0]; GG = [-beta*1/cbar*(thetabar*alpha*(alpha-1)*kbar^(alpha-1)*nbar^(1-alpha))]; HH = [0]; JJ = [beta*1/cbar*(thetabar*alpha*kbar^(alpha-1)*nbar^(1-alpha)+(1-delta)), ... -beta*1/cbar*(thetabar*alpha*(1-alpha)*kbar^(alpha-1)*nbar^(1-alpha)) ]; KK = [-1/cbar, 0] ; LL = [-beta*1/cbar*(thetabar*alpha*kbar^(alpha-1)*nbar^(1-alpha)+(1-delta)) ]; MM = [0 ]; % ---- matrices for pure exogenous state ---- % NN = [phi] ; % ----- solve for solution using muck ----- % [PP,QQ,RR,SS] = solvem(AA,BB,CC,DD,FF,GG,HH,JJ,KK,LL,MM,NN) % ----- exit ----- % comptime = etime(clock, time0) diary off