For some context/details about the assignment, see the instructions PDF.
First, install CVX if you haven't already. Download CVX from here. Extract cvx.zip to a directory of your choice. Then, from the Matlab console, cd to that directory and run cvx_setup. For example:
cd ./cvx
cvx_setupYou can then run the MPC simulation by running MPCsimPredictionModelStudent.m. This will output the following Figures:
| Figure 1 | Figure 2 |
|---|---|
![]() |
![]() |

