ajuste de funciones
DESCRIPTION
Interpolación y. Ajuste de funciones. 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. Interpolación. Interpolación Polinomial - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/1.jpg)
![Page 2: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/2.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/3.jpg)
Interpolación
Interpolación Polinomial
Polinomios Osculadores: Interpolación de
Hermite
Interpolación Racional: Aproximaciones de
Pade
Interpolación segmentaria: Splines
Otros
![Page 4: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/4.jpg)
Ajuste Polinomios de Taylor
Mínimos Cuadrados
Minimización de normas
Aproximación Racional
Series de Fourier
Curvas de Bezier
B-Splines
![Page 5: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/5.jpg)
![Page 6: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/6.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/7.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/8.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/9.jpg)
Perfil para un diseño
Polinomio interpolador
![Page 10: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/10.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/11.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/12.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/13.jpg)
![Page 14: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/14.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/15.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/16.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/17.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/18.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/19.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/20.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/21.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/22.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/23.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/24.jpg)
![Page 25: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/25.jpg)
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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/26.jpg)
-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: Ajuste de funciones](https://reader034.vdocumento.com/reader034/viewer/2022051218/56815c02550346895dc9eaa6/html5/thumbnails/27.jpg)