Borrar filtros
Borrar filtros

How can I use Lagrange in this problem?

1 visualización (últimos 30 días)
jameslk
jameslk el 27 de Mayo de 2021
Editada: Torsten el 27 de Mayo de 2021
clc; clear all
format long
A = [-0.5 2.5 6 11 20 28 50 60 80 90];
T =[18 -1 -23 -56 -56 -48 -2 -17 -92 -92];
n= length(A);
AA = 70;
s=0;
for i=1:n
L=1;
for j=1:n
if i~=j
L=L*(AA-A(j))/(A(i)-A(j));
end
end
s=s+T(i)*L;
end
disp(s);
I tried to solve this problem with lagrange but the answer seems nonsense like -4.277216600057781e+02.
I want to get value of T when A = 70
please help me
  1 comentario
Torsten
Torsten el 27 de Mayo de 2021
Editada: Torsten el 27 de Mayo de 2021
Linear interpolation between 60 and 80 gives a value of (-17-92)/2 = -54.5 at 70.
The A-T behaviour is so bad that it does not make sense to make Lagrange interpolation over the complete A range.

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