Ideal grid for interpolation based on query points

조회 수: 2 (최근 30일)
Tintin Milou
Tintin Milou 2023년 5월 20일
답변: Image Analyst 2023년 5월 21일
Hello,
My query points for a 2D interpolation are shown in this scatter plot.
Each of these points has a corresponding function value. It is quite costly to evaluate this function.
So my idea is to only evaluate the function for a small subsets of data points and then interpolate the remaining data points.
My question: Is there an efficient way to set up my grid?
Of course, I could use something like
x = linspace(min(xq(:)),max(xq(:)),10) ;
y = linspace(min(yq(:)),max(yq(:)),10) ;
[X,Y] = meshgrid(x,y) ;
And get something like this
But that does not seem to be the best grid given that some of these gridpoints are not anywhere close to the query points.
Tahnks!

채택된 답변

Image Analyst
Image Analyst 2023년 5월 21일
@Tintin Milou I don't know why you keep forgetting, or refusing, to attach your data. And I don't know why you want to use a subset of your data. A few million points does not seem like an enormous amount of data. After all, a typical digital image from a camera could be 25 million points. Have you tried it and it just takes way too long?
For what it's worth, my demo of scatteredInterpolant is attached.

추가 답변 (0개)

카테고리

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