CORRELATION_CHEBFUN
Investigate KL Expansions for Given Correlation Functions
CORRELATION_CHEBFUN
is a MATLAB library which
uses the chebfun library to compute truncated KarhunenLoeve expansions
of stochastic processes with a given correlation function.
These examples won't work unless
you get a copy of the chebfun library, install it, and make it visible
in the MATLAB path. That is, to run these examples, you must
first get a copy of the chebfun library and make it available, either by the
"addpath()" command, or else by going to the FILE menu in MATLAB, then
"Set Path...", selecting the folder where chebun resides and adding it
to your path.
Information about the chebfun library is available at
http://www2.maths.ox.ac.uk/chebfun/ ,
including instructions for getting and installing a copy for yourself.
You have to do that first, before anything in this library will work.
Alas, the "fred()" function in chebfun conflicts with a function of the
same name, but totally different utility, in the MATLAB "datafeed" toolbox.
I was only able to access the fred() I wanted by issuing the command
"rmpath ( '/usr/local/matlab/toolbox/datafeed/datafeed' )".
Correlation functions available include:

besselj

besselk

brownian

circular

constant

cubic

damped_cosine

damped_sine

exponential

gaussian

hole

linear

matern (nu = 2.5 )

pentaspherical

power (e = 2 )

rational_quadratic

spherical

white_noise
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
CORRELATION_CHEBFUN is available in
a MATLAB version.
Related Data and Programs:
CORRELATION,
a MATLAB library which
contains examples of statistical correlation functions.
Reference:

Zachary Battles, Lloyd Trefethen,
An extension of Matlab to continuous functions and operators,
SIAM Journal on Scientific Computing,
Volume 25, Number 5, 2004, pages 17431770.

Toby Driscoll,
Mercer's theorem and the KarhunenLoeve expansion,
Oxford University Mathematical Institute.

Dongbin Xiu,
Numerical Methods for Stochastic Computations:
A Spectral Method Approach,
Princeton, 2010,
ISBN13: 9780691142128,
LC: QA274.23.X58.
Source Code:
BESSELJ considers the besselj correlation function.
The domain used is [0.0, 10.0]. We were able to compute 10 eigenmodes.

besselj_correlation.m,
evaluates the correlation function.

besselj_test.m,
runs the tests.

besselj_test_output.txt,
the output file.

besselj_figure1.png,
figure 1, a plot of the eigenvalues.

besselj_figure2.png,
figure 2, four sample eigenfunctions.

besselj_figure3.png,
figure 3, the eigenvalue decay rate.

besselj_figure4.png,
figure 4, 40 sample realizations.

besselj_figure5.png,
figure 5, the correlation function estimated from realizations.
BESSELK considers the besselk correlation function.
The domain used is [0.0, 10.0]. We were able to compute 20 eigenmodes.

besselk_correlation.m,
evaluates the correlation function.

besselk_test.m,
runs the tests.

besselk_test_output.txt,
the output file.

besselk_figure1.png,
figure 1, a plot of the eigenvalues.

besselk_figure2.png,
figure 2, four sample eigenfunctions.

besselk_figure3.png,
figure 3, the eigenvalue decay rate.

besselk_figure4.png,
figure 4, 40 sample realizations.

besselk_figure5.png,
figure 5, the correlation function estimated from realizations.
BROWNIAN considers the brownian correlation function.
This correlation function is not isotropic. The domain should
begin at 0, but the correlation function rises sharply there, so
the domain used here is [0.1, 5.0]. We were able to compute 20 eigenmodes.

brownian_correlation.m,
evaluates the correlation function.

brownian_test.m,
runs the tests.

brownian_test_output.txt,
the output file.

brownian_figure1.png,
figure 1, a plot of the eigenvalues.

brownian_figure2.png,
figure 2, four sample eigenfunctions.

brownian_figure3.png,
figure 3, the eigenvalue decay rate.

brownian_figure4.png,
figure 4, 40 sample realizations.

brownian_figure5.png,
figure 5, the correlation function estimated from realizations.
CIRCULAR considers the circular correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 5 eigenmodes.

circular_correlation.m,
evaluates the correlation function.

circular_test.m,
runs the tests.

circular_test_output.txt,
the output file.

circular_figure1.png,
figure 1, a plot of the eigenvalues.

circular_figure2.png,
figure 2, four sample eigenfunctions.

circular_figure3.png,
figure 3, the eigenvalue decay rate.

circular_figure4.png,
figure 4, 40 sample realizations.

circular_figure5.png,
figure 5, the correlation function estimated from realizations.
CONSTANT considers the constant correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 1 eigenmode.

constant_correlation.m,
evaluates the correlation function.

constant_test.m,
runs the tests.

constant_test_output.txt,
the output file.

constant_figure1.png,
figure 1, a plot of the eigenvalues.

constant_figure2.png,
figure 2, four sample eigenfunctions.

constant_figure3.png,
figure 3, the eigenvalue decay rate.

constant_figure4.png,
figure 4, 40 sample realizations.

constant_figure5.png,
figure 5, the correlation function estimated from realizations.
CUBIC considers the cubic correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

cubic_correlation.m,
evaluates the correlation function.

cubic_test.m,
runs the tests.

cubic_test_output.txt,
the output file.

cubic_figure1.png,
figure 1, a plot of the eigenvalues.

cubic_figure2.png,
figure 2, four sample eigenfunctions.

cubic_figure3.png,
figure 3, the eigenvalue decay rate.

cubic_figure4.png,
figure 4, 40 sample realizations.

cubic_figure5.png,
figure 5, the correlation function estimated from realizations.
DAMPED_COSINE considers the damped_cosine correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

damped_cosine_correlation.m,
evaluates the correlation function.

damped_cosine_test.m,
runs the tests.

damped_cosine_test_output.txt,
the output file.

damped_cosine_figure1.png,
figure 1, a plot of the eigenvalues.

damped_cosine_figure2.png,
figure 2, four sample eigenfunctions.

damped_cosine_figure3.png,
figure 3, the eigenvalue decay rate.

damped_cosine_figure4.png,
figure 4, 40 sample realizations.

damped_cosine_figure5.png,
figure 5, the correlation function estimated from realizations.
DAMPED_SINE considers the damped_sine correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 10 eigenmodes.

damped_sine_correlation.m,
evaluates the correlation function.

damped_sine_test.m,
runs the tests.

damped_sine_test_output.txt,
the output file.

damped_sine_figure1.png,
figure 1, a plot of the eigenvalues.

damped_sine_figure2.png,
figure 2, four sample eigenfunctions.

damped_sine_figure3.png,
figure 3, the eigenvalue decay rate.

damped_sine_figure4.png,
figure 4, 40 sample realizations.

damped_sine_figure5.png,
figure 5, the correlation function estimated from realizations.
EXPONENTIAL considers the exponential correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

exponential_correlation.m,
evaluates the correlation function.

exponential_test.m,
runs the tests.

exponential_test_output.txt,
the output file.

exponential_figure1.png,
figure 1, a plot of the eigenvalues.

exponential_figure2.png,
figure 2, four sample eigenfunctions.

exponential_figure3.png,
figure 3, the eigenvalue decay rate.

exponential_figure4.png,
figure 4, 40 sample realizations.

exponential_figure5.png,
figure 5, the correlation function estimated from realizations.
GAUSSIAN considers the gaussian correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

gaussian_correlation.m,
evaluates the correlation function.

gaussian_test.m,
runs the tests.

gaussian_test_output.txt,
the output file.

gaussian_figure1.png,
figure 1, a plot of the eigenvalues.

gaussian_figure2.png,
figure 2, four sample eigenfunctions.

gaussian_figure3.png,
figure 3, the eigenvalue decay rate.

gaussian_figure4.png,
figure 4, 40 sample realizations.

gaussian_figure5.png,
figure 5, the correlation function estimated from realizations.
HOLE considers the hole correlation function.
The domain used here is [0.0, 1.0]. We were able to compute 20 eigenmodes.

hole_correlation.m,
evaluates the correlation function.

hole_test.m,
runs the tests.

hole_test_output.txt,
the output file.

hole_figure1.png,
figure 1, a plot of the eigenvalues.

hole_figure2.png,
figure 2, four sample eigenfunctions.

hole_figure3.png,
figure 3, the eigenvalue decay rate.

hole_figure4.png,
figure 4, 40 sample realizations.

hole_figure5.png,
figure 5, the correlation function estimated from realizations.
LINEAR considers the linear correlation function.
The domain used here is [0.0, 1.0]. We were able to compute 20 eigenmodes.

linear_correlation.m,
evaluates the correlation function.

linear_test.m,
runs the tests.

linear_test_output.txt,
the output file.

linear_figure1.png,
figure 1, a plot of the eigenvalues.

linear_figure2.png,
figure 2, four sample eigenfunctions.

linear_figure3.png,
figure 3, the eigenvalue decay rate.

linear_figure4.png,
figure 4, 40 sample realizations.

linear_figure5.png,
figure 5, the correlation function estimated from realizations.
MATERN considers the matern correlation function.
The domain used is [0.0, 10.0]. We were able to compute 10 eigenmodes.

matern_correlation.m,
evaluates the correlation function.

matern_test.m,
runs the tests.

matern_test_output.txt,
the output file.

matern_figure1.png,
figure 1, a plot of the eigenvalues.

matern_figure2.png,
figure 2, four sample eigenfunctions.

matern_figure3.png,
figure 3, the eigenvalue decay rate.

matern_figure4.png,
figure 4, 40 sample realizations.

matern_figure5.png,
figure 5, the correlation function estimated from realizations.
PENTASPHERICAL considers the pentaspherical correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

pentaspherical_correlation.m,
evaluates the correlation function.

pentaspherical_test.m,
runs the tests.

pentaspherical_test_output.txt,
the output file.

pentaspherical_figure1.png,
figure 1, a plot of the eigenvalues.

pentaspherical_figure2.png,
figure 2, four sample eigenfunctions.

pentaspherical_figure3.png,
figure 3, the eigenvalue decay rate.

pentaspherical_figure4.png,
figure 4, 40 sample realizations.

pentaspherical_figure5.png,
figure 5, the correlation function estimated from realizations.
POWER considers the power correlation function. The exponent E is set to 2.
The domain used here is [0.0, 1.0]. We were able to compute 20 eigenmodes.

power_correlation.m,
evaluates the correlation function.

power_test.m,
runs the tests.

power_test_output.txt,
the output file.

power_figure1.png,
figure 1, a plot of the eigenvalues.

power_figure2.png,
figure 2, four sample eigenfunctions.

power_figure3.png,
figure 3, the eigenvalue decay rate.

power_figure4.png,
figure 4, 40 sample realizations.

power_figure5.png,
figure 5, the correlation function estimated from realizations.
RATIONAL_QUADRATIC considers the rational_quadratic correlation function.
The domain used here is [0.0, 10.0]. We were able to compute 20 eigenmodes.

rational_quadratic_correlation.m,
evaluates the correlation function.

rational_quadratic_test.m,
runs the tests.

rational_quadratic_test_output.txt,
the output file.

rational_quadratic_figure1.png,
figure 1, a plot of the eigenvalues.

rational_quadratic_figure2.png,
figure 2, four sample eigenfunctions.

rational_quadratic_figure3.png,
figure 3, the eigenvalue decay rate.

rational_quadratic_figure4.png,
figure 4, 40 sample realizations.

rational_quadratic_figure5.png,
figure 5, the correlation function estimated from realizations.
SPHERICAL considers the spherical correlation function.
The domain used here is [0.0, 1.0]. We were able to compute 20 eigenmodes.

spherical_correlation.m,
evaluates the correlation function.

spherical_test.m,
runs the tests.

spherical_test_output.txt,
the output file.

spherical_figure1.png,
figure 1, a plot of the eigenvalues.

spherical_figure2.png,
figure 2, four sample eigenfunctions.

spherical_figure3.png,
figure 3, the eigenvalue decay rate.

spherical_figure4.png,
figure 4, 40 sample realizations.

spherical_figure5.png,
figure 5, the correlation function estimated from realizations.
WHITE_NOISE considers the white_noise correlation function.
The domain used here is [0.0, 1.0 ]. We were able to compute 0 eigenmodes,
which is consistent with the behavior of the white_noise correlation function.
You can go up one level to
the MATLAB source codes.
Last modified on 04 November 2012.