Colouring specific points in a MATLAB surface plot

geometry-surface, matlab

Solution

If you are using the surface function, you can use the 4 parameter version `surf(x,y,z,c)` where `c` lets you specify colour based on the currently used colour map. See this link at the mathworks site for more detail http://www.mathworks.co.uk/help/matlab/ref/surf.html

Problem

I have a 3 dimensional data set which I intend to analyse. After analysing the data set, basically running an algorithm to find a range of points, I this range of points to have a specific colour so that when someone sees the surface plot, they know which are the points of interest. How can this be achieved? I have tried to find some help in the mathworks forums, but so far I am not able to find a satisfactory solution.

Original source