Code covered by the BSD License
A greedy algorithm for ch...
A keyhole contour integral
A parameter dependent ODE...
A periodic ODE system
A wiggly function and its...
ANGLE, UNWRAP, and branch...
Abscissa of the linearize...
Absolute value approximat...
Advection-diffusion equat...
An Allen-Cahn equation wi...
An ellipse rolling around...
Approximation of piecewis...
Area and centroid of a 2D...
Automatic differentiation...
Battery test of Chebfun a...
Best approximation with t...
Birthday cards and analyt...
Blowup equation (Frank-Ka...
Bouncing photon, Sinai bi...
Boundary layer for advect...
CHEBFUN GUIDE 10: NONLINE...
CHEBFUN GUIDE 1: GETTING ...
CHEBFUN GUIDE 2: INTEGRAT...
CHEBFUN GUIDE 3: ROOTFIND...
CHEBFUN GUIDE 4: CHEBFUN ...
CHEBFUN GUIDE 5: COMPLEX ...
CHEBFUN GUIDE 6: QUASIMAT...
CHEBFUN GUIDE 7: LINEAR D...
CHEBFUN GUIDE 8: CHEBFUN ...
CHEBFUN GUIDE 9: INFINITE...
CHEBFUN GUIDE: INDEX
Can one hear the shape of...
Carrier equation
Chebyshev Coefficients
Chebyshev interpolation o...
Chebyshev polynomials as ...
Complex roots near the re...
Computing The Complex Sin...
Condition numbers of vari...
Convergence rates for int...
Coupled system of reactio...
Double-well Schrödin...
Dual points, lines, polyg...
Eigenstates of the Schroe...
Eigenvalue level repulsion
Eigenvalues of the Fox-Li...
Exact solutions of some ODEs
Extrema of a complicated ...
Field of values and numer...
Fractional calculus in Ch...
Frequencies of a drum
Gauss and Clenshaw-Curtis...
Gauss quadrature nodes an...
Generalized Polynomial Chaos
Gravitational force betwe...
Half-wave rectifier
Halphen's constant for ap...
Happy Valentines Day!
Heat equation via EXPM
Histogram from function o...
Jump Conditions in BVPS
Lane-Emden equation from ...
Least-squares data fittin...
Lebesgue functions and Le...
Linear EXP initial-value ...
Linear sine/cosine initia...
Lissajous curves
Local complexity of a fun...
Matched asymptotics and b...
MathJax Introduction
Maxwell's equations
Mercer's theorem and the ...
Merry Christmas!
Model of a quantum dot ar...
Multiple BVP solutions by...
Nonlinear ODE modeling so...
Nonnormality quiz from Tr...
Nonstandard 'Boundary' Co...
Optimization of a paramet...
Orbiting around fixed stars
Orr-Sommerfeld eigenvalues
Orthogonal polynomials vi...
Orthogonal polynomials vi...
Parameter-dependent ODEs:...
Perimeter of an ellipse
Piecewise Operators Demo
Polynomial basis for Herm...
Polynomial eigenproblems ...
Procrustes shape analysis
Rational interpolation, r...
Resampling of random vari...
Resolvent norm on the ima...
Roots of a Bessel function
Roots of a complex functi...
Roots of a secular equati...
Roots of random polynomials
Schwarz-Christoffel toolb...
Simple computations with ...
Singular Value Decomposit...
Spike integral
Stability Regions of ODE ...
Stability of a thermoelas...
Stochastic collocation fo...
System of two nonlinear BVPs
The Dixon-Szego function ...
The FFT in Chebfun
The Mystery of Bernoulli ...
The Nullspace of Linear O...
The Rosenbrock function i...
The gamma function and it...
The white curves of Ortiz...
Time independent Black-Sc...
Time-dependent integro-di...
Time-independent Schr&oum...
Transient Growth
Wave equation with decay ...
Wikipedia ODE examples
Wikipedia integro-differe...
Writing a message in 3D
absTest
ad_basic
Tests basic AD functionality:
ad_basic2 This test checks that Automatic Differentiation is working.
ad_qmdiff Check if automatic differentiation of a quasimatrix with respect
ad_systems Checks whether AD works correctly for multiple variables
ad_vs_diff_special A test that compares derivatives obtained via AD to derivatives obtained
ad_vs_diff_trig A test that compares derivatives obtained via AD to derivatives obtained
ad_vs_diff_trig_deg A test that compares derivatives obtained via AD to derivatives obtained
airy_extrema Verifies that the extrema of the airy function on [-15,0] are found
aliasing Tests for aliasing: Check if the constructor accurately re-constructs the
arithtest Test some basic arithmetic operators, i.e. plus, minus, times,
bary(x,gvals,xk,ek) BARY Barycentric interpolation with arbitrary weights/nodes.
bary_weights(xk) W = BARY_WEIGHTS(XK)
barymat(M,N,map,w) BARYMAT Barycentric Interpolation Matrix
barytest Test the evaluation of a chebfun using barycentric interpolation.
besseljextrema
Check if the extrema of the BesselJ function on [0,100] are recovered
besseljroots
Checks if the roots of the BesselJ function on [0,100] are recovered
blowup(on_off) BLOWUP CHEBFUN blowup option
blowup_exps Build a series of chebfuns with different non-integer exponents and check
blowup_scale Tests scale invariance for functions with blowups (integer exponents
blowup_splitting Check if blowups and splitting play well together.
booltest Test boolean operators on chebfuns and quasimatrices.
breakpoints Check if splitting works, with or without breakpoints.
bvp45ctest This routine tests the chebfun wrappers for the BVP solvers
callpref Check if options passed to the constructor are handled correctly.
cftest
Test CF approximation in various ways.
chebbench(varargin) CHEBBENCH Chebfun Benchmark
chebdomain Tests the chebfun constructor using the domain class.
chebfunpref(varargin) CHEBFUNPREF Settings for Chebfun.
chebfunpreftest Tests the chebfunpref options by getting and setting them
chebguiedit(varargin) CHEBGUIEDIT MATLAB code for chebguiedit.fig
chebguiwindow(varargin) CHEBGUIWINDOW Driver file for Chebfun's CHEBGUI
cheblogo
Chebfun logo.
chebop_bc
Solve two simple linear BVPs, check the solution vs. the exact
chebop_bc2 Test nonseperable boundary conditions and other supplementary conditions
chebop_cumsum
Check if the indefinite integral chebop works.
chebop_diff
Checks if the differentiation chebop is equivalent to differentiating
chebop_different_syntaxes
Checks whether different allowed syntaxes for chebops work
chebop_eigs Test the chebop eigs method.
chebop_ellipjode Test to check that the chebfun command for
chebop_expm Test the chebop expm method.
chebop_feval Test various combinations of inputs to chebop/feval.
chebop_fitbcs Create chebops, convert them to linops, and obtain chebfuns which satisfy
chebop_gmrestest Test the Chebfun implementation of GMRES for solving Lu = f,
chebop_intops
Test integral operators
chebop_ivp
This tests solves a linear IVP using chebop and checks
chebop_linop Test the chebop linop method.
chebop_polyeigs Test the chebop polyeigs method.
chebop_pwintops This test checks the construction of the piecewise fred and volt
chebop_pwlinear This test constructs a piecewise-linear chebop and checks
chebop_scalingtest
This tests solves a nonlinear pendulum BVP with
chebop_simplify
This test has a purpose: to make sure that the
chebop_svds Test the chebop svds method.
chebop_systemeig
Eigenvalue test, inspired by Maxwell's equation.
chebop_systemexpm
Exponential test, inspired by Maxwell's equation
chebop_systemsolve1
chebop_systemsolve2
Test solution of a 2x2 system
chebop_v4tests Test a few things concerning the version 4 chebops (i.e.
chebop_vs_linop Chebtest CHEBOP_VS_LINOP
cheboppref(varargin) CHEBOPPREF Settings for chebops.
chebpadetest Test the chebpade function against some examples.
chebpoly(n,d,kind) CHEBPOLY Chebyshev polynomial of degree n.
chebpolytest Tests chebpoly with integer and chebfun arguments.
chebpolyval(c,kind) CHEBPOLYVAL maps Chebyshev coefficients to values at Chebyshev points
chebpts(n,d,kind)
chebsnake(nodes,alpha) CHEBSNAKE Chebfun snake game.
chebtest(dirname) CHEBTEST Probe Chebfun against standard test files.
circplate
Use a linear chebop to compute the deflection of a circular plate.
complexrotation
This code makes sure a few things are ok if you make them complex,
composetest Test composition of chebfuns with chebfuns and chebfuns
convTest
convspline
Generates piecewise polynomial cardinal B-splines by a process
ctortest Test the chebfun constructor for vectorized and non-vectorized
cumsum_fracexps Tests CUMSUM for Chebfuns with fractional exponents. This situation
cumsum_infint Check CUMSUM on for functions which diverge over an infnite
cumsum_oscillate Compute the indefinite integral of an oscillatory function
cumsummat(N)
CUMSUMMAT Chebyshev integration matrix.
cumsumunbnd Test CUMSUM for chebfuns that have negative, and possibly
diff_matrices Test the construction of differentiation matrices
diffexp Tests the computation of derivatives using DIFF
diffinf Tests the computation of derivatives using DIFF when the
diffmat(N,k) DIFFMAT Chebyshev differentiation matrix
difforder Check to see whether difforder of systems are computed correctly.
diffsingmaps Tests the computation of derivatives using DIFF when the
diffsingmaps Tests the computation of derivatives using DIFF when the
elementary Check that computations of elementary functions
ellipjtest Test the accuracy of the Chebfun overload of the
evalcomplex Check that a chebfun evaluates correctly for complex arguments.
exact_endpoints Test whether endpoints are interpolated (exactly):
exps_ctor Tests construction with exps
exps_cumsum Tests cumsum with exponents
exps_diff Tests diff with exponents
exps_sum Tests SUM for Chebfuns with exponents
extracting_roots Test extracting roots with and without maps
falknerskan
Solves the Falkner-Skan equation and checks the result.
findexps_test Tests automatic exponent computation for functions
fov(A) FOV Field of values (numerical range) of matrix A
fovtest Tests the FOV (field of values) function.
fraccalctest Perform some tests for fractional derivatives
funscale Check that fun scales have been correctly updated after
fzerotest Tests the fzero wrapper.
grammatrix
Construct the Gram matrix with chebfuns and
guide2tests Perform various tests from chapter 2 of the Chebfun Guide.
hermpoly(n,type) HERMPOLY Hermite polynomial of degree n.
hermpts(n,varargin) HERMPTS Hermite points and Gauss-Hermite Quadrature Weights.
infimps Check that imps are properly set in computations involving exps
interp1test Check that the Chebfun-overloaded INTERP1
inverseq This test checks roots and the vectorise preference
invtest This test constructs two chebfuns and uses inv to invert them. It checks
isequaltest Check if chebfun/isequal works by comparing a chebfun with itself
ivp_test This test solves the Van der Pol ODEs in Chebfun with ode113. It checks
ivp_testcomplex Nick Trefethen March 2009
ivp_ty_test
This test solves the Van der Pol ODE in
jacpoly(N,a,b,d,flag) JACPOLY Jacobi polynomials.
jacpts(n,alpha,beta,varar... JACPTS Gauss-Jacobi Abscissae and Quadrature Weights.
jacptstest This test computes Legrendre points with Gauss quadrature weights. It
lagpoly(n) LAGPOLY Laguerre polynomial of degree n.
lagpts(n,int,meth) LAGPTS Laguerre points and Gauss-Laguerre Quadrature Weights.
lebesgue(x,varargin)
lebesguetest
This tests computes the Lebesgue function and Lebesgue constant
legpoly(n,d,normalize,met... LEGPOLY Legendre polynomials.
legpts(n,int,meth)
LEGPTS Legendre points and Gauss Quadrature Weights.
legptstest This tests checks legpts and the accuracy of the method GW and FAST
lexerParserTest This test ensures that the chebgui string parser is doing the correct
linop_bcchange
Check if changing the boundary conditions of a chebop that has already
linop_diag
Check if multiplication with a pointwise multiplication operator
linop_eye
Checks the 10 by 10 realization of the identity operator.
linop_feval_lr Check that left/right evaluation with linops behaves as expected.
linop_functionals
Tests the construction and applciation of the Chebfun/Chebop
linop_operarith
This test checks basic arithmetric operations of linops
linop_systemapply
Test 2x2 systems applied to functions.
linopzerotest Checks whether iszero information for linear chebops is being passed and
mapends_nan_inf Tests for rounding errors on mapped endpoints and NaN and inf error
mappref(varargin) MAPPREF fun map preferences
mappreftest Tests the mappref options by getting and setting them
maps(varargin) CHEBFUN MAPS
mathieu
This test computes periodic Mathieu functions and eigenvalues for the
matrixnorms This test constructs a matrix with chebfuns as columns and computes
max_and_imps Tests if max introduces small jumps when computing the maximum
max_min Tests max and min of functions.
max_min_unbnd Tests max and min of unbounded functions.
maxdegree Tests if the maxdegree is working in resampling on and off modes.
maxdoubleroots
maxtest This test checks max when the difference between the functions
mfun_integrate This test computes the integrals of blow-up functions
minsamples_adapt Test for minsaples in adaptive mode on an infinite domain (unbounded maps)
misclnttests1 This tests the chebfun constructor with different syntax, sum and norm.
nanavoidance This test check that NaNs are avoided on point evaluations
normtests This test checks that norm of a chebfun is working correctly
orrsommerfeld
Orr-Sommerfeld eigenvalues for plane Poiseuille flow (just barely
orthosincos
This test constructs a system of chebfuns and checks they have been
outerprod
This test checks that the outer product of a system of chebfuns is
paramODE Test solving a parameter dependent ODE.
pdeset(varargin) PDESET Set options for pde15s
plotrow This test checks that row chebfuns can be plotted
plusquasimatrix This test checks that quasimatrices of different sizes cannot be added.
pointevals This test checks that point evaluations are working.
pole_construct Test to check if Chebfun operations on the basic chebfun 'x'
polyfittest This test checks that the polyfit commmandis working correctly.
polytest This test check that poly and ployval are working correctly.
qrTest
qrtest Tests QR factorization of Chebfun quasimatrices.
quadtest Tests sum and quad over bounded domains.
ratinterp( f , varargin ) RATINTERP computes a robust rational interpolation or approximation.
ratinterptest Check a few basics with ratinterp
remeztest The REMEZ command constructs infinity-norm
resampletest Test if the resampling option is working by counting the number of
resampling(on_off) RESAMPLING CHEBFUN resample option
residuetest Tests the Chebfun residue command.
restrict_roots Test restriction from one interval to another with { }.
restrictimps Test handling of the imps matrix by restrict
restrictscl This function tests the retrict function (problem related to a bug report
rootsTest
rootspol Check behavior of roots of a perturbed polynomial
scale Tests for scale invariance.
scaleinvariance
This code makes sure a few things are scale-invariant.
scaleinvariance2 Modification of scaleinvariance.m
schrodinger_sqwell
Tests eigs with piecewise constant coefficient, on a Schrodinger
scribble.m
scribbleTest
scribbleio Tests that scribble responds to the expected input and output
scribbles scribbles.m - uses "scribble" to test various things
sing(str,bpm) SING - A basic keyboard for MATLAB using chebfuns
sinx (by Rodrigo Platte)
smallintervals Tests of operations on small intervals
splitting(on_off) SPLITTING CHEBFUN splitting option
splittingtest A collection of tests for exact jump detection
sqrt_test Tests representations of the square root
std_test Check that std of a complex chebfun gives the correct real result.
stringinput Makes sure that the Chebfun constructor accepts
subspacetest test the subspace function (angle between subspaces). Also calls vander.m
sumcos20x
Tests a couple of simple integrals, real and complex.
suminftest Test a few things involving sum applied to
sumtest Tests various integrals over unbounded domains.
test_ratinterp ( ) Test the ratinterp function with different input types
unbndpolys Tests both the construction of Laguerre and Hermite polynomials on unbounded
unboundednorms Tests norm for unbounded domains and subtraction of chebfuns.
vectornorms Sets up a chebfun with two pieces and
webexamples Test the examples that are on the front page of the Chebfun website
anon ANON constructor for the anon class, which is used to work with AD
chebconst
chebfun CHEBFUN Constructor for chebfuns.
chebgui INTRODUCTION TO CHEBGUI
fun
FUN Class definition for funs
oparray
OPARRAY Array of function handles.
varmat
VARMAT Variable-sized matrix object constructor.
{?double}) chebop CHEBOP Construct an operator on chebfuns.
{?double}) domain DOMAIN Domain object constructor.
{?double}) linop
function A = linop(varargin)
ATAPformats.m ATAPformats.m Set formats for Trefethen's book
Contents.m Chebfun
ExampleTemplate.m One line description of Example
LevinIntegrate.m An oscillatory integral
guidedefaults.m guidedefaults.m - run this to set up nice
View all files
Chebfun V4
by
Chebfun Team
30 Apr 2009
(Updated
24 Jun 2014 )
Numerical computation with functions instead of numbers.
vectornorms
function pass = vectornorms
% Sets up a chebfun with two pieces and
% checks various of its norms.
% (A Level 0 chebtest)
% Nick Trefethen 27 October 2008
f = chebfun(1,2,0:4:8);
norms(1) = norm(f,1);
norms(2) = norm(f,2);
norms(3) = norm(f,inf);
norms(4) = norm(f,'fro');
norms(5) = norm(f',1);
norms(6) = norm(f',2);
norms(7) = norm(f',inf);
norms(8) = norm(f','fro');
s = sqrt(20);
exact = [12 s 2 s 12 s 2 s];
pass = norms-exact < 1e-14*chebfunpref('eps')/eps;
Contact us