27

Interpolación y

  • Upload
    tacy

  • View
    134

  • Download
    0

Embed Size (px)

DESCRIPTION

Interpolación y. Ajuste de funciones. Una Introducción. 22. 20. 18. 16. Grados. 14. 12. 10. 8. 6. 6. 8. 10. 12. 14. 16. 18. 20. 22. 4. Hora. Un problema de Aproximación. Evolución de la temperatura diurna. Interpolacion. Interpolación Polinomial - PowerPoint PPT Presentation

Citation preview

Page 1: Interpolación y
Page 2: Interpolación y

Hora 6 8 10 12 14 16 18 20Grados 7 9 12 18 21 19 15 10

Un problema de Aproximación

Evolución de la temperatura diurna

4

8

20

6 8 10

12

14

16

18

20

22

6

10

12

14

16

18

22

Hora

Gra

dos

Page 3: Interpolación y

Interpolacion

Interpolación Polinomial

Polinomios Osculadores: Interpolación de

Hermite

Interpolación Racional: Aproximaciones de

Pade

Interpolación segmentaria: Splines

Otros

Page 4: Interpolación y

Ajuste Polinomios de Taylor

Mínimos Cuadrados

Minimización de normas

Aproximación Racional

Series de Fourier

Curvas de Bezier

B-Splines

Page 5: Interpolación y
Page 6: Interpolación y

Interpolación Polinómica Segmentaria

Limitaciones de la interpolación polinómicaGrado del polinomio Carácter de la función a interpolar

Alternativa propuesta: Splines.Numéricamente estableMatrices dispersasAgradable a la vista

Page 7: Interpolación y

Interpolación Polinomica Segmentaria: Splines

Interpolación Segmentaria

Interpolación Segmentaria Lineal

Interpolación Segmentaria Cúbica

Condiciones Naturales

Condiciones sobre la derivada

Page 8: Interpolación y

Interpolación Segmentaria Lineal: Función de Runge

-1 0 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Spline lineal

-1 0 1-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Polinomio grado 4

yx

1

1 25 2

Page 9: Interpolación y

Perfil para un diseño

Polinomio interpolador

Page 10: Interpolación y

Aplicaciones

Ingeniería y Diseño (CAD/CAM, CNC’s) Geología Aeronáutica y automoción Economía Procesamiento de señales e imágenes (Reconocimiento de patrones, recuperación de imágenes) Robótica Medicina (Aparatos auditivos, mapas cerebrales) Meteorología (Mapas climáticos, detección de inundaciones,...) Mundo Virtual Distribuido Multiusuario

Page 11: Interpolación y

Interpolación Polinómica Segmentaria

D a d o s n + 1 p u n t o s ( x 0 , y 0 ) , ( x 1 , y 1 ) , . . . , ( x n , y n ) c o nx 0 < x 1 … < x n , u n a f u n c i ó n s p l i n e d e o r d e n k ( k - S p l i n e )s o b r e d i c h o s p u n t o s e s u n a f u n c i ó n S v e r i f i c a n d o : ( i ) S ( x ) = q k ( x ) p o l i n o m i o d e g r a d o k , x [ x k , x k + 1 ] ,k = 0 , 1 , . . . , n - 1 ( i i ) S ( x k ) = y k , k = 0 , 1 , . . . , n ( i i i ) 1

0 1,kS C x x

Page 12: Interpolación y

Splines Lineales

Polinomio de Lagrange

Polinomio de Newton

q xx x

x xy

x x

x xyk

k

k kk

k

k kk( )

1

1 11

q x f x f x x x x

yy y

x xx x

k k k k k

kk k

k kk

( ) [ ] [ , ]( )

( )

1

1

1

Page 13: Interpolación y

Splines Lineales

Page 14: Interpolación y

Interpolación Segmentaria Lineal: Función de Runge

-1 0 10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Spline lineal

-1 0 1-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

Polinomio grado 4

yx

1

1 25 2

Page 15: Interpolación y

Splines Cúbicos Spline cúbico

4n incógnitas Condiciones de interpolación

n+1 ecuaciones Condiciones de conexión

3(n-1) ecuaciones

q x a b x x c x x d x xk k k k k k k k( ) ( ) ( ) ( ) 2 3

( )k kS x y

1 1 1

' '1 1 1

'' ''1 1 1

( ) ( )

( ) ( )

( ) ( )

k

k

k k k k

k k k

k k k

q x q x

q x q x

q x q x

Page 16: Interpolación y

ha a

ha a

kk k

kk k

1

11

3 3( ) ( )

h c h h c h ck k k k k k k

1 1 1 1

2 ( )

a f x k nk k ( ), , ,...,0 1

bh

a ah

c c k nkk

k kk

k k

1

32 0 1 11 1( ) ( ), , ,...,

d c c h k nk k k k ( ) / ( ), , ,1 3 0 1 1

h x xk k k 1

q x a b x x c x x d x xk k k k k k k k( ) ( ) ( ) ( ) 2 3

n-1 ecuaciones y n+1 incógnitas

Page 17: Interpolación y

Condiciones Naturales

Teorema 1

Sea f(x) una función definida en [x0,xn]. Entoncesexiste un único s(x) spline interpolante cúbicopara f(x) en [x0,xn] tal que

s’’(x0) = 0 y s’’(xn) = 0.

cn = s’’(xn)/2 = 0s’’(x0) = 2c0 = 0 c0 = 0.

Page 18: Interpolación y

Matriz del sistema

M

h h h

h h h h

h h h

h h h

h h h h

h h h

n n n

n n n n

n n n

2 0 0 0 0

2 0 0 0

0 2 0 0 0

0 0 0 2 0

0 0 0 2

0 0 0 0 2

0 1 1

1 1 2 2

2 2 3

4 3 3

3 3 2 2

2 2 1

( )

( )

( )

( )

( )

( )

Page 19: Interpolación y

p

ha a

ha a

ha a

ha a

nn n

nn n

3 3

3 3

12 1

01 0

11

21 2

( ) ( )

( ) ( )

Términos independientes

Page 20: Interpolación y

Ejemplo de la temperatura

5 10 15 206

8

10

12

14

16

18

20

22

Hora

Gra

dos

Spline cúbico

5 10 15 206

8

10

12

14

16

18

20

22

Hora

Gra

dos

Polinomio interpolador

Page 21: Interpolación y

Condiciones sobre la derivada

Teorema 2

Sea f(x) una función definida en [x0,xn]. Entonces existe un únicos(x) spline cúbico interpolante para f(x) en [x0,xn].tal que

s’(x0) = f’(x0) y s’(xn) = f’(xn).

23

30 0 0 10

1 0 0h c h ch

a a f x ( ) ' ( )

h c h c f xh

a an n n n nn

n n

1 1 11

12 33

' ( ) ( ).

Page 22: Interpolación y

Matriz del sistema

M

h h

h h h h

h h h h

h h h

h h h

h h h h

h h

n n n

n n n n

n n

2 0 0 0 0 0

2 0 0 0 0

0 2 0 0 0

0 0 2 0 0 0

0 0 0 0 2 0

0 0 0 0 2

0 0 0 0 0 2

0 0

0 0 1 1

1 1 2 2

2 2 3

3 2 2

2 2 1 1

1 1

( )

( )

( )

( )

( )

Page 23: Interpolación y

Términos independientes

p

ha a f x

ha a

ha a

ha a

ha a

f xh

a a

nn n

nn n

nn

n n

33

3 3

3 3

33

01 0 0

12 1

01 0

11

21 2

11

( ) ' ( )

( ) ( )

( ) ( )

' ( ) ( )

Page 24: Interpolación y

Splines Cúbicos

Page 25: Interpolación y

Interpolación segmentaria con MATLAB

Interpolación segmentaria cúbica ps = spline(x,y) % Devuelve el Spline, no los

coeficientes

[x,s] = unmkpp(ps) % Devuelve los coeficientes

ps = mkpp(x,s)

syy = spline(x,y,xx) = ppval(ps,xx)

Interpolación segmentaria lineal lyy = interp1(x,y,xx)

Page 26: Interpolación y

-1 0 1

0

0.5

1 Spline Natural

-1 0 10

0.5

1 Spline Derivada

-1 0 10

0.5

1 Interpolación Lineal

-1 0 1

0

0.5

1 Spline de MATLAB

Page 27: Interpolación y