Click time_varying_LQR.m link to view the file.