Problems - NK DSGE model

You have various places with expressions like

(Ibarhc/Hbar)

where the denominator is 0, resulting in NaN.