% m53_series.m - Explore Fourier and Chebyshev series with Chebfun % FOURIER F = chebfun('cos(exp(sin(t)))', [-pi,pi], 'trig') subplot(1,2,1), plot(F,'.-') subplot(1,2,2), plotcoeffs(F,'.-') sum(F) roots(F) help cheb.gallerytrig % CHEBYSHEV f = chebfun('cos(exp(sin(x)))', [-pi,pi]) subplot(1,2,1), plot(f,'.-') subplot(1,2,2), plotcoeffs(f,'.-') sum(f) roots(f) help cheb.gallery % "SMOOTHIES" - C-INFINITY but NOWHERE ANALYTIC f = smoothie('trig'); subplot(1,2,1), plot(f) subplot(1,2,2), plotcoeffs(f) f = smoothie; subplot(1,2,1), plot(f) subplot(1,2,2), plotcoeffs(f)