Intepolate in 2D loop of points
Show older comments
Hi all,
I have a shape made up of regularly spaced data points in 2D. I want to increase the sampling of the points, i.e. interpolate between points as I need the outer edge in higher resolution than it is currently. I have tried intep etc, alphaShape and meshgrid but am struggling, so any help would be great. I have also tried just doing it for the points that make up the perimeter of the shape as this is what I'm interested in, but didn't get anywhere with that easier and thought it might be easier to do it as a whole object?
An example of a data set can be seen below.
%-2.57812500000000 -2.92968750000000
-2.57812500000000 -3.04687500000000
-2.57812500000000 -3.16406250000000
-2.57812500000000 -3.28125000000000
-2.57812500000000 -3.39843750000000
-2.57812500000000 -3.51562500000000
-2.57812500000000 -3.63281250000000
-2.57812500000000 -3.75000000000000
-2.57812500000000 -3.86718750000000
-2.57812500000000 -3.98437500000000
-2.46093750000000 -2.81250000000000
-2.46093750000000 -2.92968750000000
-2.46093750000000 -3.04687500000000
-2.46093750000000 -3.16406250000000
-2.46093750000000 -3.28125000000000
-2.46093750000000 -3.39843750000000
-2.46093750000000 -3.51562500000000
-2.46093750000000 -3.63281250000000
-2.46093750000000 -3.75000000000000
-2.46093750000000 -3.86718750000000
-2.46093750000000 -3.98437500000000
-2.34375000000000 -2.57812500000000
-2.34375000000000 -2.69531250000000
-2.34375000000000 -2.81250000000000
-2.34375000000000 -2.92968750000000
-2.34375000000000 -3.04687500000000
-2.34375000000000 -3.16406250000000
-2.34375000000000 -3.28125000000000
-2.34375000000000 -3.39843750000000
-2.34375000000000 -3.51562500000000
-2.34375000000000 -3.63281250000000
-2.34375000000000 -3.75000000000000
-2.34375000000000 -3.86718750000000
-2.22656250000000 -2.46093750000000
-2.22656250000000 -2.57812500000000
-2.22656250000000 -2.69531250000000
-2.22656250000000 -2.81250000000000
-2.22656250000000 -2.92968750000000
-2.22656250000000 -3.04687500000000
-2.22656250000000 -3.16406250000000
-2.22656250000000 -3.28125000000000
-2.22656250000000 -3.39843750000000
-2.22656250000000 -3.51562500000000
-2.22656250000000 -3.63281250000000
-2.22656250000000 -3.75000000000000
-2.22656250000000 -3.86718750000000
-2.10937500000000 -2.46093750000000
-2.10937500000000 -2.57812500000000
-2.10937500000000 -2.69531250000000
-2.10937500000000 -2.81250000000000
-2.10937500000000 -2.92968750000000
-2.10937500000000 -3.04687500000000
-2.10937500000000 -3.16406250000000
-2.10937500000000 -3.28125000000000
-2.10937500000000 -3.39843750000000
-2.10937500000000 -3.51562500000000
-2.10937500000000 -3.63281250000000
-2.10937500000000 -3.75000000000000
-2.10937500000000 -3.86718750000000
-1.99218750000000 -2.34375000000000
-1.99218750000000 -2.46093750000000
-1.99218750000000 -2.57812500000000
-1.99218750000000 -2.69531250000000
-1.99218750000000 -2.81250000000000
-1.99218750000000 -2.92968750000000
-1.99218750000000 -3.04687500000000
-1.99218750000000 -3.16406250000000
-1.99218750000000 -3.28125000000000
-1.99218750000000 -3.39843750000000
-1.99218750000000 -3.51562500000000
-1.99218750000000 -3.63281250000000
-1.99218750000000 -3.75000000000000
-1.87500000000000 -2.34375000000000
-1.87500000000000 -2.46093750000000
-1.87500000000000 -2.57812500000000
-1.87500000000000 -2.69531250000000
-1.87500000000000 -2.81250000000000
-1.87500000000000 -2.92968750000000
-1.87500000000000 -3.04687500000000
-1.87500000000000 -3.16406250000000
-1.87500000000000 -3.28125000000000
-1.87500000000000 -3.39843750000000
-1.87500000000000 -3.51562500000000
-1.87500000000000 -3.63281250000000
-1.87500000000000 -3.75000000000000
-1.75781250000000 -2.34375000000000
-1.75781250000000 -2.46093750000000
-1.75781250000000 -2.57812500000000
-1.75781250000000 -2.69531250000000
-1.75781250000000 -2.81250000000000
-1.75781250000000 -2.92968750000000
-1.75781250000000 -3.04687500000000
-1.75781250000000 -3.16406250000000
-1.75781250000000 -3.28125000000000
-1.75781250000000 -3.39843750000000
-1.75781250000000 -3.51562500000000
-1.75781250000000 -3.63281250000000
-1.75781250000000 -3.75000000000000
-1.64062500000000 -2.46093750000000
-1.64062500000000 -2.57812500000000
-1.64062500000000 -2.69531250000000
-1.64062500000000 -2.81250000000000
-1.64062500000000 -2.92968750000000
-1.64062500000000 -3.04687500000000
-1.64062500000000 -3.16406250000000
-1.64062500000000 -3.28125000000000
-1.64062500000000 -3.39843750000000
-1.64062500000000 -3.51562500000000
-1.64062500000000 -3.63281250000000
-1.64062500000000 -3.75000000000000
-1.52343750000000 -2.46093750000000
-1.52343750000000 -2.57812500000000
-1.52343750000000 -2.69531250000000
-1.52343750000000 -2.81250000000000
-1.52343750000000 -2.92968750000000
-1.52343750000000 -3.04687500000000
-1.52343750000000 -3.16406250000000
-1.52343750000000 -3.28125000000000
-1.52343750000000 -3.39843750000000
-1.52343750000000 -3.51562500000000
-1.52343750000000 -3.63281250000000
-1.40625000000000 -2.46093750000000
-1.40625000000000 -2.57812500000000
-1.40625000000000 -2.69531250000000
-1.40625000000000 -2.81250000000000
-1.40625000000000 -2.92968750000000
-1.40625000000000 -3.04687500000000
-1.40625000000000 -3.16406250000000
-1.40625000000000 -3.28125000000000
-1.40625000000000 -3.39843750000000
-1.40625000000000 -3.51562500000000
-1.40625000000000 -3.63281250000000
-1.28906250000000 -2.57812500000000
-1.28906250000000 -2.69531250000000
-1.28906250000000 -2.81250000000000
-1.28906250000000 -2.92968750000000
-1.28906250000000 -3.04687500000000
-1.28906250000000 -3.16406250000000
-1.28906250000000 -3.28125000000000
-1.28906250000000 -3.39843750000000
-1.28906250000000 -3.51562500000000
-1.28906250000000 -3.63281250000000
-1.17187500000000 -2.69531250000000
-1.17187500000000 -2.81250000000000
-1.17187500000000 -2.92968750000000
-1.17187500000000 -3.04687500000000
-1.17187500000000 -3.16406250000000
-1.17187500000000 -3.28125000000000
-1.17187500000000 -3.39843750000000
-1.17187500000000 -3.51562500000000
-1.17187500000000 -3.63281250000000
-1.05468750000000 -2.81250000000000
-1.05468750000000 -2.92968750000000
-1.05468750000000 -3.04687500000000
-1.05468750000000 -3.16406250000000
-1.05468750000000 -3.28125000000000
-1.05468750000000 -3.39843750000000
-1.05468750000000 -3.51562500000000
-1.05468750000000 -3.63281250000000
-0.937500000000000 -2.92968750000000
-0.937500000000000 -3.04687500000000
-0.937500000000000 -3.16406250000000
-0.937500000000000 -3.28125000000000
-0.937500000000000 -3.39843750000000
-0.937500000000000 -3.51562500000000
-0.937500000000000 -3.63281250000000
-0.820312500000000 -3.04687500000000
-0.820312500000000 -3.16406250000000
-0.820312500000000 -3.28125000000000
-0.820312500000000 -3.39843750000000
-0.820312500000000 -3.51562500000000
-0.820312500000000 -3.63281250000000
-0.703125000000000 -3.28125000000000
-0.703125000000000 -3.39843750000000
-0.703125000000000 -3.51562500000000
-0.703125000000000 -3.63281250000000
end
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation 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!