faster alternative to scatteredinterpolant

2 Ansichten (letzte 30 Tage)
Kim
Kim am 25 Okt. 2014
Kommentiert: Kim am 27 Okt. 2014
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 Kommentar
Kim
Kim am 27 Okt. 2014
I havent been able to figure out a way to speed up the interpolation. Does anyone have a potential solution? Thank you!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by