added m file to plot 3d indices