how to extrapolate with given data? (maybe very simple)

I want to guess outside the given data! For example data x = 1:5 y = [7 9 10 11 12] are given. And I want to guess the values at x=6,7. (For any method) How can I do it? Help me..

 Respuesta aceptada

Stephen23
Stephen23 el 6 de Jun. de 2017
Editada: Stephen23 el 6 de Jun. de 2017
>> interp1(x,y,[6,7],'linear','extrap')
ans =
13 14
And remember that extrapolated values are always to be taken with a pinch of salt.

3 comentarios

JaeSung Choi
JaeSung Choi el 6 de Jun. de 2017
oh my god, thank you very much!! you saved me from searching
riadh euldji
riadh euldji el 26 de Jun. de 2021
hello sir how can do extrapolation
let's take this exemple to extrapolate beyond the range x =1:5 like 6 to 8
and our new rang will be x1=1:8 is that possible ????
Stephen23
Stephen23 el 26 de Jun. de 2021
@riadh euldji: did you try the code given in my answer ????

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 6 de Jun. de 2017

Comentada:

el 26 de Jun. de 2021

Community Treasure Hunt

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

Start Hunting!