Chebfun is an open-source software system for numerical computing with
functions. The mathematical basis of Chebfun is piecewise polynomial
interpolation implemented with what we call “Chebyshev technology”. The
foundations are described, with Chebfun examples, in the book _Approximation
Theory and Approximation Practice_. Chebfun has extensive capabilities for
dealing with linear and nonlinear differential and integral operators, and it
also includes continuous analogues of linear algebra notions like QR and
singular value decomposition. The Chebfun2 extension works with functions of
two variables defined on a rectangle in the x-y plane. To get a sense of the
breadth and power of Chebfun, a great place to start is by looking at our
[Examples][1].
The mathematical basis of Chebfun is numerical algorithms involving piecewise polynomial interpolants and Chebyshev polynomials, and this is where the name "Cheb" comes from. The package aims to combine the feel of symbolic computing systems like Maple and Mathematica with the speed of floating-point numerics.
The Chebfun project is based in the Mathematical Institute at the University of Oxford and was initiated in 2002 by Lloyd N. Trefethen and his student Zachary Battles. Its most recent version is on the web:
https://www.chebfun.org/download/
or from MathWorks web site.
To install, you can either clone the directory with Git or download a .zip
file. Note that a call to `clear classes` is required if you had a previous
version of Chebfun installed.
## Option 1: Download .zip file
Download a .zip of Chebfun from
- https://github.com/chebfun/chebfun/archive/master.zip
After unzipping, you will need to add Chebfun to the matlab path. You can do
this either (a) by typing
```
addpath(chebfunroot), savepath
where `chebfunroot` is the path to the unzipped directory, (b) by selecting the
`chebfun` directory with the `pathtool` command, or (c) though the File > Set
Path... dialog from the matlab menubar.
## Option 2: Clone with Git
To clone the Chebfun repository, first navigate in a terminal to where you
want the repository cloned, then type
```
git clone https://github.com/chebfun/chebfun.git
```
To use Chebfun in matlab, you will need to add the `chebfun` directory
to the matlab path as above.
Most Chebfun commands are overloads of familiar matlab commands — for example sum(f) computes an integral, roots(f) finds zeros, and u = L\f solves a differential equation.
To get a sense of the breadth and power of Chebfun, a good place to start is by looking at our Examples (http://www.chebfun.org/examples/) or the introductory Guide (http://www.chebfun.org/docs/guide/).
Please contact us with any questions/comments at help@chebfun.org.
Example:
A user may begin by initialising the variable x, on the interval [0,10], say.
x = chebfun('x',[0,10]);
This variable can now be used to perform further computations, for example, computing and plotting roots of a function:
f = sin(x) + sin(x.^2); plot(f)
r = roots(f); hold on, plot(r,f(r),'.r'), hold off
-
Battles, Z. and Trefethen, L.N., An extension of Matlab to continuous functions and operators, SIAM J. Sci. Comp., 2004, Vol. 25, No. 5, pp. 1743--1770.
-
Chebfun Guide 7: Linear Differential Operators and Equations Mathworks.
-
Chebfun Team (2020). Chebfun - current version, GitHub. Retrieved February 13, 2020. Mathworks.
-
Driscoll, T.A., Hale, N., Trefethen, L.N., Chebfun Guide.
-
Pachón, R., Platte, R.P., and Trefethen, L.M., Piecewise smooth chebfuns, IMA Journal of Numerical Analysis, 2010, Vol. 30, pp. 898--916.
-
Trefethen, Nick, List of publications.
-
Webb, Computing complex singularities of differential equations with Chebfun, SIAM Undergrad. Res. Online 2011
-
Example:
**DESCRIPTION OF PROBLEM GOES HERE**
This is a description for some MATLAB code. MATLAB is an extremely useful tool for many different areas in engineering, applied mathematics, computer science, biology, chemistry, and so much more. It is quite amazing at handling matrices, but has lots of competition with other programs such as Mathematica and Maple. Here is a code snippet plotting two lines (
y vs. x and
z vs. x) on the same graph. Click to view the code!
figure(1)
plot(x, y, 'Color', [1 0 0]) %blue line
hold on
plot(x, z, 'Color', [0 1 0]) %green line