I have a matrix that I would like to plot using imagesc. I have done this and then used one of the standard colormaps (jet, summer, etc.). My matrix is a 75×75 matrix and the matrix consist of only five different values that I would like to plot in five specific colors.
For example -1 = blue, 3 = green, 4 = grey, 5 = Brown and 10 = red.
I have only managed to create a range of colors by using the standard colormaps (ranging from blue to red for example). I tried to create my own colormap, however I could only involve three different colors. When I tried to involve four colors I received an error saying that there was something wrong with my dimensions.
In Excel this is very simple and I guess it's the same in Matlab and that I'm missing something very basic here?
Best Answer