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 5idx = Z>=3 ;plot3(X(idx),Y(idx),Z(idx),'.r','markersize',10)%%highlight points which are less then 5idx = Z<=-3 ;plot3(X(idx),Y(idx),Z(idx),'.b','markersize',10) Related SolutionsMATLAB: How to plot a graph of two different 2D plots with data set: plot 1 (x,z) and plot 2 (y,z) in One 3D plot showing (x,y,z) ...plot3(x,zeros(size(x)),z)hold on...plot3(zeros(size(y)),y,z) MATLAB: How to plot a 3d graph with projection of 3d axis values on to the 2d surface with vertical lines N = 100 ;x = rand(N,1) ; y = rand(N,1) ; z = rand(N,1) ;% pick some points from above to draw vertical linesidx = randperm(N,10) ; x1 = x(idx) ; y1 = y(idx) ; z1 = z(idx) ; x2 = x(idx) ; y2 = y(idx) ; z2 = 0*z(idx) ; % draw vertical lines plot3(x,y,z,'ob')hold onplot3([x1 x2]',[y1 y2]',[z1 z2]','r') Related QuestionHow to plot x^2+z^2=9 above the xy plane and between y=-1 and y=2Draw 3D object.write code in 2016a version. Help me,thanks!
Best Answer