INTERPOLACIÓN POLINOMIAL DE NEWTON

June 13, 2019 | Author: chingonfregon | Category: N/A
Share Embed Donate


Short Description

Download INTERPOLACIÓN POLINOMIAL DE NEWTON...

Description

AGUILAR HERNANDEZ GUILLERMO 4°1 TAREA #: 10

INTERPOLACIÓN POLINOMIAL DE NEWTON EN DIFERENCIAS DIVIDIDAS

Diferencias Divididas.

Interpolación de Newton.

function [D] = DifeDivididas(x,f) % Se obtiene la matriz de diferencias divididas D n = length(f)-1; D = zeros(n+1,n+1); D(:,1) = f; for j=2:n+1 for i=1:n-j+2 D(i,j) = (D(i+1,j-1)-D(i,j-1))/(x(i+j-1)-x(i)); end end

function yt = Newton(x,f,xt) % Se obtiene la matriz de diferencias divididas D n = length(f)-1; D = zeros(n+1,n+1); D(:,1) = f; for j=2:n+1 for i=1:n-j+2 D(i,j) = (D(i+1,j-1)-D(i,j-1))/(x(i+j-1)-x(i)); end end % Se realiza la interpolacion para los valores de prueba xt for t=1:length(xt) sum = 0; for i=1:n+1 prod = 1; for j=1:i-1 prod = prod*(xt(t)-x(j)); end sum = sum + D(1,i)*prod; end yt(t) = sum; end

Problemas Intepolacion de Newton y Diferencias Divididas. Utilice interpolación de Newton para determinar el valor de x que corresponde a f(x) = 0.85, para los datos tabulados siguientes:

>> x=[0:5]; >> f=[0 0.5 0.8 0.9 0.941176 0.961538]; >> xt=0.85; >> [D] = DifeDivididas(x,f) D = 0 0.5000 0.5000 0.3000 0.8000 0.1000 0.9000 0.0412 0.9412 0.0204 0.9615 0 >> yt = Newton(x,f,xt)

-0.1000 -0.1000 -0.0294 -0.0104 0 0

-0.0000 0.0235 0.0063 0 0 0

0.0059 -0.0043 0 0 0 0

-0.0020 0 0 0 0 0

yt = 0.4339

Emplee la porción de la tabla de vapor que se da para el H2O supercalentada a 200 MPa, para a) encontrar la entropía correspondiente s para un volumen específico v de 0.108 m3/kg b) hallar el volumen correspondiente a una entropía de 6.6 con el empleo de interpolación de Newton.

>> v=[0.10377 0.11144 0.1254]; >> s=[6.4147 6.5453 6.7664]; >> vt=0.108; >> [D] = DifeDivididas(v,s) D = 6.4147 17.0274 -54.9825 6.5453 15.8381 0 6.7664 0 0 >> st = Newton(v,s,vt) st = 6.4875 respuesta inciso a) >> [D] = DifeDivididas(s,v) D = 0.1038 0.0587 0.0125 0.1114 0.0631 0 0.1254 0 0 >> st=6.6; >> vt = Newton(s,v,st) vt = 0.1148 respuesta inciso b)

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF