I am trying to create an interpolant on a higher dimensional data set similar to how pchip and ppval would work. Does anyone know if such a method is implemented in Matlab (multivariate piecewise cubic Hermite interpolating polynomial)? I would need something like pchip(x1,x2,x3,F) to return the piecewise polynomial form. The reason is that I want to gain speed by calculating the interpolation only once in the beginning and then only evaluating it. Right now I use interpn and works well but I need to make it faster. Should I try to use a neural network to approximate my hypersurface?
Any ideas or advices will be appreciated.

 채택된 답변

Matt J
Matt J 2021년 5월 17일

1 개 추천

It will be somewhat faster to use griddedInterpolant() rather than interpn().

댓글 수: 1

Adri
Adri 2021년 5월 17일
편집: Adri 2021년 5월 17일
Thank you so much! This is it! It's almost as fast the compiled mex file of the neural network regression I did.
Elapsed time is 1.968169 seconds. % interpn
Elapsed time is 0.036454 seconds. % mex file from neural network approximation
Elapsed time is 0.279966 seconds. % the neural network generated code
Elapsed time is 0.042881 seconds. % griddedInterpolant()

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interpolation에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2021년 5월 17일

편집:

2021년 5월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by