Code covered by the BSD License  

Highlights from
Chebfun V4

image thumbnail

Chebfun V4



30 Apr 2009 (Updated )

Numerical computation with functions instead of numbers.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

function pass = exps_cumsum
% Tests cumsum with exponents
% Nick Hale, Nov 2009

tol = chebfunpref('eps');

f = chebfun('1./sqrt(x)',[0 1],'exps',[-.5 -0]);
g = chebfun('2*sqrt(x)',[0 1],'exps',[.5 0]);

pass = norm(cumsum(f)-g,inf) < 500*tol;

Contact us