% m34Chebfun.m - m34 again, now in Chebfun % (see Section 10.3 of the Chebfun Guide and Appendx B, eq. 32) N = chebop(0,1000); N.lbc = [-1.2; 0] C = input('C? (e.g., 10, 100, 1000) '); N.op = @(u) diff(u,2) + C*(u^2-1)*diff(u) + u; disp(' ') disp('Chebfun with stiff solver') tic u = N\0; plot(u) toc disp(' ') disp('Default Chebfun with non-stiff solver') tic [t,u] = N\0; toc plot(u) disp(' ')