FIT x1,y1 x2,y2 ... args
Defines a piecewise linear polynomial function or time dependent value.
This function fits a set of piecewise polynomials to a set of data.
For capacitors, this function defines charge as a function of voltage. For inductors, it defines flux as a function of current.
For fixed sources, it defines voltage or current as a function of time.
The values of x must be in increasing order.
If order is 1, it is the same as PWL. If order is 3, it will use cubic splines. The result and its first two derivatives are continuous.
Outside the specified range, it uses linear extrapolation. The behavior depends on the parameters before and after. The value of before or after is the derivative to use, which is a resistance for resistors, voltage gain for a VCVS, and so on. If it is not specified, the value is automatically determined.
For first order (linear) interpolation, the default slope outside the range is the extension of the slope in the end segments.
For third order (cubic spline) interpolation, the default is to use ``natural'' splines, which sets the second derivative to zero at the boundary. If a value of before or after is specified, ``clamped'' splines will be used. In any case, there will be a smooth transition at the boundaries. When using ``clamped'' splines, the second derivative may have a discontinuity at the boundaries.