MATLAB: How to highlight particular points in a 3D surf plot

3d plots

I would like to highlight only important points that I want in a 3D surf plot. Please suggest a method to do it.
Thank You in advance!

Best Answer

[X,Y,Z] = peaks(25) ;
surf(X,Y,Z)
hold on
%%highlight points which are greater then 5
idx = Z>=3 ;
plot3(X(idx),Y(idx),Z(idx),'.r','markersize',10)
%%highlight points which are less then 5
idx = Z<=-3 ;
plot3(X(idx),Y(idx),Z(idx),'.b','markersize',10)