I am facing a problem as follows: I have created a Voronoi diagram and now I want to assign to each region, a value, i.e., I want to extend this Voronoi diagram to form a 2 variable function in Matlab. For example, let one of the cells be named $R_1$, I want that the 2 variable function I am going to assign a constant value (e.g., $f(x,y)=4$) to all the points in $R_1$. Similarly for the other cells.
Edit: I am including the information about how Voronoi diagram is being stored herein. What I am using is
voronoin function that returns the vertices of polygons and cells with corresponding vertices of which they are made up of. Also, since the edges partitioning in Voronoi diagrams are straight lines, it is possible to trace out the cells.