File size: 471 Bytes
b1b3bae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Imports DWSIM.MathOps.MathEx

Public Class Extrapolation

    Public Shared Function Extrapolate(equation As Func(Of Double, Double), xpoints() As Double, x_extrap As Double) As Double

        Dim y As New List(Of Double)

        For Each x In xpoints
            y.Add(equation.Invoke(x))
        Next

        Dim y_extrap = Interpolation.polinterpolation.nevilleinterpolation(xpoints, y.ToArray, 5, x_extrap)

        Return y_extrap

    End Function

End Class