MATLAB: How can i use inpolygon on the surface with the area

inpolygon

If the points inside the surface it will be true and if it is outside it will be false.
So i want to paint them in blue and red, but i watched the inpolygon function in the description and i can't do the same thing on my surface.
The problem is that i create random points and they are located in x = [0,1] and y [0,2]. How can i adapt my points that are outside or inside my surface with the area from the body.
Unbenannt.jpg

Best Answer

I tried a little bit and now i have just the points on my surface but i want the points inside with red + and outside the surface with blue points
Unbenannt.jpg