This document contains information about the Lagrange interpolation method from a Numerical Methods class at the Instituto Politécnico Nacional in Mexico. It includes the class name, teacher, student, and group number. The code uses inputs to define the x and y values of n data points and calculates the Lagrange interpolation formula to find the value of y for a given x.
This document contains information about the Lagrange interpolation method from a Numerical Methods class at the Instituto Politécnico Nacional in Mexico. It includes the class name, teacher, student, and group number. The code uses inputs to define the x and y values of n data points and calculates the Lagrange interpolation formula to find the value of y for a given x.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
This document contains information about the Lagrange interpolation method from a Numerical Methods class at the Instituto Politécnico Nacional in Mexico. It includes the class name, teacher, student, and group number. The code uses inputs to define the x and y values of n data points and calculates the Lagrange interpolation formula to find the value of y for a given x.
Copyright:
Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online from Scribd
ESCUELA SUPERIOR DE INGENIERIA Y ARQUITECTURA ESIA UNIDAD ZACATENCO
PROGRAMA MATERIA: MATEMATICAS V METODOS NUMERICOS MAESTRO: ROSETE CARRANCO ELIU ALUMNO: PACHECO PREZ EMMANUEL BOLETA: 2010310399 GRUPO: 5CM02
METODO DE INTERPOLACION DE LOGRANGE
Private Sub Command1_Click() Dim n, i, j As Integer Dim equis, x(20), y(20), suma, num, denom As Single equis = InputBox("DAME x") n = InputBox("DAME n") For i = 1 To n Step 1 x(i) = InputBox("x(" & i & ")") y(i) = InputBox("y(" & i & ")") Next i For i = 1 To n Step 1 suma = 0 num = 1 denom = 1 For j = 1 To n Step 1 If (i <> j) Then num = num * (equis - x(j)) denom = denom * (x(i) - x(j)) Else End If Next j suma = suam + y(i) * (num / denom) Next i Picture1.Print "Y="; suma End Sub