Extrapolation with minimum variation
이전 댓글 표시
Hello everyone,
I have a function of two variables that I don't know and I want to try to guess. For this I have a small number of samples and their value in the function. To apply my method, I must calculate the gradient of the function (in this case of the interpolation of my function) to see where I find the maximum differences in the gradient to sample more in those areas. If I apply an interpolation (linear for example) to the data I have, I cannot calculate the gradient of the output because I get NaN values (the interpolation only works for points inside the convex hull and the domain of the function is larger). I have tried extrapolating using scatteredInterpolant, inpaint_nans and inpaintn but the values I get in some extrapolated areas differ quite a lot so the gradient there is very high.
I need a method where the extrapolation hardly varies so that the gradient is focused on the points inside the convex area. What is the best way to do this in Matlab? I can't find any other function that comes close to what I want.
I leave you some screenshots so that you can understand what is happening to me:

As can be seen, when extrapolating, very different values are obtained at the edges (the original function is not like that).

So when computing the gradient, the areas with the most variation are at the edges. I need to calculate the variation inside the points I already have.
Any suggestions are welcome. Thank you very much in advance!
댓글 수: 1
Mathieu NOE
2023년 5월 25일
it would be nice to share your code and data
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Interpolation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!