These methods will work for any function f that's represented by a global polynomial, i.e., a chebfun consisting of one fun. (Normally this means that the Chebyshev series needs fewer than 65536 terms, Chebfun's default value of MAXDEGREE. To change this default, type HELP CHEBFUNPREF.) What about Chebyshev coefficients for functions that are not smooth enough for such a representation? Here one can use the TRUNC option in the Chebfun constructor. For example, suppose we are interested in the function