Modified code for batch array plotting with masterPlotArray.m