cheby_fit

fit = cheby_fit(f, interval, n)
or fit = cheby_fit(f, x, n)
returns the Chebyshev fit (for use in cheby_eval) of degree N
to the function F on the INTERVAL (a 2 element array [a,b]).
In the second form, F and X are arrays; the function to be
fit is the piecewise linear function of xp interp(f,x,xp), and
the interval of the fit is [min(x),max(x)].
The return value is the array [a,b, c0,c1,c2,...cN] where [a,b]
is the interval over which the fit applies, and the ci are the
Chebyshev coefficients. It may be useful to use a relatively
large value of N in the call to cheby_fit, then to truncate the
resulting fit to fit(1:3+m) before calling cheby_eval.
interpreted function, defined at i/cheby.i line 7
