faster alternative to scatteredinterpolant

4 ビュー (過去 30 日間)
Kim
Kim 2014 年 10 月 25 日
コメント済み: Kim 2014 年 10 月 27 日
I have data that looks approximately as follows:
W=[ 1 2 4 5 ; 2 3 4 4; 3 6 7 8 ; 2.5 3 4 5; 4 5 6 7]
Y =[ 1 3 5 7 ; 1 3 5 7; 1 3 5 7; 1 3 5 7; 1 3 5 7];
C = [ 2 3 4 5; 2 4 5 6; 3 4 5 6; 2 3 6 7; 4 5 6 6];
F = scatteredInterpolant([W(:)],[Y(:)],[C(:)]);
C1 = F(3,4)
I need to do this a lot of times, and my code takes hours. This is just a simplified version of the data, just to show you it is non-monotonic and not a grid. Can I sort of manipulate the data into a grid, so that I can use interp2? I tried 'nearest' instead of 'linear', and it is 20% faster, however, I worry about the accuracy. Thank you very much for helping me.
  1 件のコメント
Kim
Kim 2014 年 10 月 27 日
I havent been able to figure out a way to speed up the interpolation. Does anyone have a potential solution? Thank you!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by