flt()ΒΆ

Fast Legendre transform according to the algorithm presented in Iserles, Numer. Math. 117, 529-553 (2010).


Syntax:C = flt(FUN,N,DOMAIN)
Description:computes the first N Legendre coefficients of the expansion of the function FUN, defined over the domain DOMAIN, and returns them in the vector C. The input FUN must be a handle to the function to be projected onto the first N Legendre polynomials, N must be a non-negative integer, and DOMAIN must be a vector with 2 elements, i.e. DOMAIN = [a,b] with a<b.