fixing fred to make sure example stats/MercerKarhunenLoeve.m works.
Flipped the ordering of the coefficient vector returned to go from (high) negative modes to (high) positive modes.
changing the test for chebtech/fourcoeffs.m
Merge pull request #1128 from chebfun/fix-chebtech-fourcoeffs

Make fourcoeffs at chebtech level return coefficients from negative to positive modes
Improve the test for chebfun.chebcoeffs().

The call to merge() in chebfun.chebcoeffs() prevented this test from testing
extraction of coefficients for a function with a breakpoint like it said it
was.  This is now fixed, and we've also added tests to check that things are
working properly with array-valued chebfuns.
Fix a bug when evaluating periodic boundary conditions.
Adding system of ODEs case and avoid IF statement.
Fix bugs in chebfun.chebcoeffs() for second-kind coefficients.

There were two problems here.

First, the code hadn't been converted for the changes to the way we handle the
coefficients.  We never detected this because none of our tests exercised this
part of the code.  Some tests have now been added.

Second, there was an error which caused the last requested coefficients
(highest degree) to be computed incorrectly because we didn't calculate enough
first-kind coefficients to use the first-kind-to-second-kind recurrence to to
calculate these higher-order coefficients.  This doesn't matter if we ask for
all the second-kind coefficients of a fully-resolved function, since the
highest-degree coefficients are basically zero, but if we ask for only a few
coefficients or if the function is only piecewise smooth, it becomes obvious
that something is wrong.

We fix this by simply computing two extra first-kind coefficients when
second-kind ones are requested.  This should be OK for smooth functions, but
for piecwise-smooth ones which require the integrals, it will be more
expensive.  I've left a TODO in the file reminding us to revisit this if it
becomes a problem.
Modification suggested by Asgeir.
Revert chebfun.chebpoly() to use old format for outputting the coefficients.

This should fix the recent breaks to ATAP caused by reversing the order of the
coefficients.  (ATAP uses chebpoly(), not chebcoeffs() to do its work.)  This
function is deprecated anyway, so having it retain the old behavior doesn't
cost us much (though if it's deprecated, we should really consider axing it in
a future release, say, Chebfun v6.0).

Since retaining this behavior is important at least for the time being, I've
added a test (basically a copy of the test for chebcoeffs()) to prevent us from
messing things up.
Minor modifications and add documentation.
Merge pull request #1132 from chebfun/fix-chebpoly

fix-chebpoly
Adding a test.
Merge branch 'development' of ssh://github.com/chebfun/chebfun into fix-periodic-nonlinear
Fixing typos, and clarifying comments.

Also ensuring different signs of results for evaluting BCs don't
cancel out by squaring the results straight away.
adding error for complex chebfuns.
Merge branch 'development' of https://github.com/chebfun/chebfun into feature-trigremez
Merge branch 'fix-remez-errmsg' of https://github.com/chebfun/chebfun into feature-trigremez

Conflicts:
	@chebfun/remez.m
remez for periodic chebfun works!