MATLAB: Arrange data according to geographic regions I have set

georgraphiclatitudelongitudeshapefile

Hi everyone,
I have rainfall data across Australia which I am trying to organise into geographic regions.
I have defined the geographic regions on QGIS and have created a shapefile. I then have an array on MATLAB where the rows/columns represent latitude and longitude and the values represents the precipitation data.
I am unsure how to use the shapefile to separate this precipitation data into the regions I created on the shapefile.
Any help would be greatly appreciated thank you!

Best Answer

  1. You can load/ read the shapefile using shaperead.
  2. You can seperate the required region from a grid using inpolygon.
  3. You can plot the surface using pcolor/ surf.
  4. You can use inteprolation using interp2.
Refer this if you want to seperate different regions of shape file from given arrays.