chebfun/chebfun — pull request #1133 by Hadrien-Montanelli (2014-08-26 14:26:48+00:00)
Title: Feature FOURCOLLOC

`fourcolloc` is a concrete class that implements `colloc` using Fourier points for periodic functions.
I've also introduced an abstract class `chebcolloc` between `colloc` and `colloc1`/`colloc2`.
Moreover, I've renamed the latter `chebcolloc1`/`chebcolloc2`. If @tobydriscoll (and others) disagree with this renaming, I can change back to `colloc1`/`colloc2`.
I've added tests in tests/fourcolloc for linear, nonlinear and system of ODEs.
Here is a very basic example. Fore more complicated examples, see tests/fourcolloc.

```
% Solve u' + u = cos(x), on [0 2*pi], with periodic boundary conditions.

% Set domain dom, operator L, and rhs f.
dom = [0 2*pi];
L = chebop(@(u) diff(u) + u, dom);
f = chebfun(@(x) cos(x), dom);

% Solve with FOURIER technology.
cheboppref.setDefaults('discretization', 'periodic');
u = L \ f;
exact = chebfun(@(x) 1/2*cos(x) + 1/2*sin(x), dom, 'periodic');
norm(u - exact, inf)
```

```
ans =
4.718727263764627e-15
```

Two comments.
1. `'periodic'` can be replaced by `'fourcolloc'` or `@fourcolloc`.
2. No boundary condition in `L.bc` needed since the cos/sin are periodic.