BayES BayES

B.10 Error function, Beta, Gamma and related mathematical functions

The following table describes statements that are used to evaluate the error function, Beta, Gamma and related functions.




Syntax

Mathematical expression

Arguments and return values




W = erf(X);

2 π0xet2 dt

W is a matrix with values equal to error function evaluated at each entry of X. The function works element-wise.

  • X must be a matrix or dataset




W = erfc(X);

2 πxet2 dt

W is a matrix with values equal to complementary error function evaluated at each entry of X. The function works element-wise.

  • X must be a matrix or dataset




W = betafunc(X, Y);

B x =01tx1 1 ty1dt

W is a matrix with values equal to the beta function of each entry of X and the corresponding entry of Y. The function works element-wise.

  • X must be a matrix or dataset with positive entries
  • Y must be a matrix or dataset with positive entries
  • The dimensions of X must be equal to the dimensions of Y
  • If X or Y contain non-positive entries then the corresponding entries of W are set to nan or inf




W = lbetafunc(X, Y);

log B x,y

W is a matrix with values equal to the natural logarithm of the beta function of each entry of X and the corresponding entry of Y. The function works element-wise.

  • X must be a matrix or dataset with positive entries
  • Y must be a matrix or dataset with positive entries
  • The dimensions of X must be equal to the dimensions of Y
  • If X or Y contain non-positive entries then the corresponding entries of W are set to nan or inf




W = betainc(Z, X, Y);

Iz x,y = 0ztx1 1 ty1dt B x,y

W is a matrix with values equal to the normalized/regularized lower incomplete beta function of each entry of X and the corresponding entry of Y. The function works element-wise.

  • Z must be a matrix or dataset with positive entries
  • X must be a matrix or dataset with non-negative entries
  • X, Y and Z must have equal dimensions
  • If Z contains negative entries or entries above one an error is produced
  • If X or Y contain non-positive entries then an error is produced




W = gammafunc(X);

Γ x =0tx1etdt

W is a matrix with values equal to the gamma function of each entry of X. The function works element-wise.

  • X must be a matrix or dataset
  • If X contains non-positive integers then the corresponding entries of W are set to nan or inf




W = lgammafunc(X);

log Γ x

W is a matrix with values equal to the natural logarithm of the gamma function of each entry of X. The function works element-wise.

  • X must be a matrix or dataset
  • If X contains non-positive entries an error is produced




W = gammainc(Z, X);

γ z,x Γ(x) =0ztx1etdt Γ x

W is a matrix with values equal to the normalized/regularized lower incomplete gamma function of each entry of X. The function works element-wise.

  • Z must be a matrix or dataset with positive entries
  • X must be a matrix or dataset with non-negative entries
  • the dimensions of X must be equal to the dimensions of of Z
  • If X or Z contain non-positive entries then an error is produced




W = mvgammafunc(X, k);

Γk x = πkk1 4 j=1kΓ x + 1 j 2

W is a matrix with values equal to the k-dimensional gamma function of each entry of X. The function works element-wise.

  • X must be a matrix or dataset
  • k must be a positive integer
  • If X contains non-positive integers then the corresponding entries of W are set to nan or inf




W = lmvgammafunc(X, k);

log Γk x

W is a matrix with values equal to the natural logarithm of the k-dimensional gamma function of each entry of X. The function works element-wise.

  • X must be a matrix or dataset
  • k must be a positive integer
  • If X contains non-positive integers then the corresponding entries of W are set to nan or inf



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