The two R codes are related to the feasible balance region calculations for Figures 2, 3, and 4 in the paper.
The MATLAB codes are related to the simulations of the recoverable initial quasi-static states, the results of which are shown in Figure 5 of the paper.