How can I convert an alpha Triangulation data to a grid?

4 views (last 30 days)
I've got scattered velocity data (from particle tracking velocimetry - PTV) and had been using the griddata to interpolate results to a grid. However, I would instead like to interpolate to a grid ONLY the data within the alpha shape but aren't sure as how to do it. Any ideas?

Answers (1)

Roberto
Roberto on 12 Oct 2016
I found out a way to do it but I'm not sure this is the only way of doing it... Here's the code to get the data interpolated to a grid:
ugrid = griddata(x, y, u, xq, yq);
However, since my data has holes in it, I wanted to interpolate to the grid, ONLY the values from the alpha shape. Here's how I'm taking care of that:
shp = alphaShape(x, y);
in = inShape(xhp, xq, yq);
ugridin = ugrid;
ugridin(in==0) = NaN;

Categories

Find more on Bounding Regions in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!