SELECTPOINTS3D-Graphicallyselectabunchof(2Dor3D)pointsbymakingapolygoninthecurrentaxesviewINSIDE=vlt.matlab.graphics.selectpoints3d(PTS3D)Selectasubsetofpointsona(potentially3D)graphbydraggingapolygon.Allowstheusertodragapolygonoverthecurrentaxes(maybein3Dor2Dmode)andthisfunctionwillreturnthepointsinPTS3Dthatareinsidethepolygon.PTS3Dshouldbea2xNor3xNmatrixwhereNisthethenumberofpoints.Ifonly2-dimensionalpointsarepassedthenthefunctionwillstillwork.Output:INSIDEisanNdimensionalvectorof0's and 1's;INSIDE(i)is1ifandonlyifPTS3D(:,i)isinsidetheuser-drawnpolygon.Pleasenotethatthisfunctiondoesnotplotthepoints;thepointsshouldalreadybeplottedifyouwantthemtobevisibletotheuser.Example:pts=randn(30,3);figure;plot3(pts(:,1),pts(:,2),pts(:,3),'ko');drawnow();%changetheview,maybeusetherotate3dtoolinside=vlt.matlab.graphics.selectpoints3d(pts'); % need to transpose to column vectorsholdon;indexes=find(inside);plot3(pts(indexes,1),pts(indexes,2),pts(indexes,3),'bs');%addredxtoselectedpoints%lookaroundwithrotate3dtooltomakesureitisright