MATLAB: HOW TO DIVIDE A AREA WITH X AND Y COORDINATES INTO GRID AND FIND COORDINATES OF THEIR CENTRES POINT

area to gridcentre pointMATLAB

i want to divide a area into n number of parts , and how to get their centre points.

Best Answer

For any rectangular area (whether or not it is aligned with the X and Y axes), the center point is at the average of the first and last X value, and average of first and last Y value.