faster alternative to scatteredinterpolant

4 visualizaciones (últimos 30 días)
Kim
Kim el 25 de Oct. de 2014
Comentada: Kim el 27 de Oct. de 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 comentario
Kim
Kim el 27 de Oct. de 2014
I havent been able to figure out a way to speed up the interpolation. Does anyone have a potential solution? Thank you!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by