plot( squeeze(aVars(11,iAl,:)), 'color', myColorMap((iAl), :));
In the first one you had a 3D matrix accessed at (specific value, specific value, :) . In MATLAB the result of that would be 1 x 1 x N, a 3D result. MATLAB cannot plot 3D vectors.
In the second one you had a 3D matrix accessed at (specific value, :, specific value). In MATLAB the result of that would be 1 x N x 1 and then the trailing 1's get dropped, leaving 1 x N which is a 2D result; MATLAB is able to plot with 2D vectors.
The squeeze() I added above transforms the 3D vector into a 2D vector.
Best Answer