Generating non-linear n vectors for interpolation

조회 수: 7 (최근 30일)
Si Cla
Si Cla 2017년 5월 23일
답변: John D'Errico 2017년 5월 23일
I have a scatter of points (example image attached). I want to interpolate them using griddata. However, I'm having trouble generating query points. Usually I use "linspace" however I need the query points to be within the bounds of the scatter distribution - it represents a physical object - and so is non-linear. Linspace seems inappropriate.
As the query points need to be within the bounds of the distribution I though of using monte carlo to sample random co-ordinates from a mixed-Gaussian distribution, however it seems a little involved for what I want to do.
Is there a method I've overlooked which would allow me to generate n points from within the bounds of my scattered data?
Many thanks in advance!

답변 (1개)

John D'Errico
John D'Errico 2017년 5월 23일
The words "within the bounds", as they apply to scattered data are not as easy to implement as you think.
Clearly the set of points you show are not a convex set. But would you generate points within the convex hull of that set? After all, there are lots of holes between the points. Which holes are small enough to say lie within the bounds, and which holes are not?
The point is, one can sample from within a convex hull easily enough. But as soon as you decide to allow the set to be non-convex, and the set is defined only by scattered points, then all bets are off. Holes are holes.
One idea is to start with an alpha shape, using that to define the non-convex hull. Or just use the convex hull.

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by