Example of demographic transition in OLG model Using VFI Toolkit
You run 'DemogTransOLG.m', it does the rest.
The two 'import data' scripts explain the exact sources of the data used for 'mewj', 'sj', and 'n' (including the origin of the spreadsheet that a copy of is included here).