clear all; alpha = 0.35; delta = 0.06; sigma = 0.20; kstar = (sigma/delta)^(1/(1-alpha)); ystar = kstar^alpha; k(1) = 0.5*kstar; t = 0; d = 100; while d > 0.005 t = t+1; y(t) = k(t)^alpha; i(t) = sigma*y(t); k(t+1) = (1-delta)*k(t)+i(t); d = abs((y(t)-ystar)/ystar); end disp(t);