I need to create a polygon or buffer along an irregular shaped coastline in a 2D array of gridded sea temperature data.
I have a 578×235 grid of ocean temperature data in which the land pixels are NaN. I would like to create a 1 pixel buffer around the coastline so that all pixels adjacent to an existing NaN also become NaN. I’m unsure on the best way to do this. I thought I could create a logical array of NaNs and not NaNs but am not sure on the best way to extract a polygon and create the buffer after that step.I have a 578×235 grid of ocean temperature data in which the land pixels are NaN. I would like to create a 1 pixel buffer around the coastline so that all pixels adjacent to an existing NaN also become NaN. I’m unsure on the best way to do this. I thought I could create a logical array of NaNs and not NaNs but am not sure on the best way to extract a polygon and create the buffer after that step. I have a 578×235 grid of ocean temperature data in which the land pixels are NaN. I would like to create a 1 pixel buffer around the coastline so that all pixels adjacent to an existing NaN also become NaN. I’m unsure on the best way to do this. I thought I could create a logical array of NaNs and not NaNs but am not sure on the best way to extract a polygon and create the buffer after that step. extract polygon, buffer MATLAB Answers — New Questions