Code covered by the BSD License
30 Apr 2009
05 Apr 2012)
Numerical computation with functions instead of numbers.
This file was selected as MATLAB Central Pick of the Week
function pass = chebop_diff
% Checks if the differentiation chebop is equivalent to differentiating
% a chebfun.
d = [-3,-1.5];
D = chebop(@(u) diff(u), d);
f = chebfun(@(x) exp(sin(x).^2+2),d);
pass = norm(D*f - diff(f)) < chebfunpref('eps');