The program aiyagari.m is the main script: it computes the equilibrium and plots the ergodic distribution of capital stocks. aiyagari_eq.m computes the ergodic distribution for a given guess of the aggregate capital stock, while aiyagari_obj.m computes the istantaneus utility function. aiyagari2.m and aiyagari3.m perform some experiments of interest.