Code covered by the BSD License  

Highlights from
Chebfun

image thumbnail

Chebfun

by

 

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

maxdegree
function pass = maxdegree
% Tests if the maxdegree is working in resampling on and off modes.

pref = chebfunpref; %pref.resmapling = true; 
pref.maxdegree = 100;
warnstate = warning('off','CHEBFUN:auto');

f = chebfun(@(x) sin(200*x),pref);
pass(1) = length(f) == 101;

pref.resampling = false;
f = chebfun(@(x) sin(200*x),pref);
pass(2) = length(f) == 101;

warning(warnstate)



Contact us