The thiele command finds the rational interpolation.
Instead of a single matrix, the data can be given as a vector of x coordinates and a vector of y coordinates (in which casethe call to thiele has three arguments).
Instead of a single matrix data, two vectors x=(x1,x2,…,xn) and y=(y1,y2,…,yn) This method computes Thiele interpolated continued function based on the concept of reciprocal differences.
It is not guaranteed that R is continuous, i.e. it may have singularities in the shortest segment which contains all components of the x coordinates.
thiele([[1,3],[2,4],[4,5],[5,8]],x) |
|
thiele([1,2,a],[3,4,5],3) |
|
In the following example, data is obtained by sampling the function f(x)=(1−x4) e1−x3.
data_x:=[-1,-0.75,-0.5,-0.25,0,0.25,0.5,0.75,1,1.25,1.5,1.75,2]:; data_y:=[0.0,2.83341735599,2.88770329586, 2.75030303645,2.71828182846,2.66568510781, 2.24894558809,1.21863761951,0.0,-0.555711613283, -0.377871362418,-0.107135851128,-0.0136782294833]:; thiele(data_x,data_y,x) |
|