BayES BayES

B.8 Matrix decompositions & quadratures

The following statements are used to decompose matrices (or datasets) or to produce abscissae and weights for approximating integrals via Gaussian quadratures.



Syntax

Arguments and performed function



L = chol(X);

L is a lower-triangular matrix such that: L*L= X

  • X must be a symmetric and positive-definite matrix or dataset
  • If X is not positive definite an error is produced



[v, V] = eig(X);

If X is an M ×M symmetric matrix then v is an M ×1 vector that contains the eigenvalues of X and V is an M ×M matrix that contains the corresponding eigenvectors, such that: V*diag(v)*inv(V)= X

  • X must be a symmetric matrix or dataset
  • Only the lower triangular part of X is used for the decomposition. This means that if X is not symmetric, BayES will not produce a warning or error message



[x, w] = quadrature(n [, s]);

x is an n ×1 vector of abscissae and w an n ×1 vector of corresponding weights for a Gaussian quadrature. Depending on the value of the optional argument, the abscissae and weights could be for a Gauss-Laguerre or Gauss-Hermite quadrature.
For the Gauss-Laguerre quadrature it holds:
i=1n wi f(xi) 0+exf x i dx
For the Gauss-Hermite quadrature it holds:
i=1n wi f(xi) ex2 f xi dx

  • i must be an integer between 2 and 300;
  • s must be equal to either "laguerre" or "hermite". The default value for s is "laguerre", for which the abscissae and weights are for a Gauss-Laguerre quadrature.


Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis