% % ch2ex1.m is a matlab file that solves for % the 'steady-state' for a simplified % ramsey model % % ----- save output to file ----- % clear all diary ch2ex1.mout diary off delete ch2ex1.mout diary ch2ex1.mout % ----- display date and time of computation ----- % %format long date time0 = clock; % ----- define the parameters ----- % alpha = 0.36; delta = 0.025 ; beta = 0.99; abar = 1; % ----- dfine fsolve options ----- % options = optimset('Display','iter','MaxIter',5000,'MaxFunEvals',5000); % ----- solve for steady states ----- % sol1 = fsolve(@ch2ex1F,[1,1],options,alpha,delta,beta,abar) % ----- check solution ----- % sol1ck = ch2ex1F(sol1,alpha,delta,beta,abar) % ----- exit ----- % comptime = etime(clock, time0) diary off