Can anyone help me with dynamic programming of this linear quadratic regulator (LQR) system in order to find optimal control and optimal trajectory in MATLAB m. file? I should discritize it with Ts=0.1 and I should also do interpolations and extrapolation.