In matlab2pgfplotsColormap need to deal with the case where the MATLAB colormap has only a single color, which is valid in MATLAB but an error in pgfplots. Simply repeating the single color in the colormap seems to produce the desired effect.
Merge branch 'colormap'