Matlab (2016) code used to create figures. Each script is named as the figure it produced. Figure 4b uses the same script as figure 3b/3d