Navigation Banner
 
 HYPHY Command Reference:Built-in Functions

Command Description Modified On
Abs Absolute value.
If x is a number, returns |x|.
If x is a matrix, returns maximum absolute value among matrix elements, unless x is vector in which case the euclidean norm is returned. If x is a string, returns the length of the string.
8/9/2002
Arctan Inverse Tangent. Returns the inverse tangent of x. 8/17/1999
ASSIGNED_SEED If ASSIGNED_SEED is set, then it is fed to the standard random number generator seed function. Can be used to replicate simulation results. 1/19/2000
Beta The 'Beta'function. Beta(x,y)=Gamma(x)Gamma(y)/Gamma(x+y).
8/17/1999
BranchCount When applied to a tree variable, returns the number of internal branches in the tree. 1/19/2000
BranchLength 'BranchLength' returns the expected number of substitution along a given branch using the model and parameter value currently attached to the branch. The value of 0 is returned for undefined cases. 5/11/2000
BranchName Returns a string containing the name of an internal node of the tree. 5/11/2000
CChi2 The cumulative Chi squared distribution.
CChi2(x,n) = P{t<x}, where t is a random variable with the Chi-squared n degrees of freedom distribution.
5/11/2000
CGammaDist The cumulative gamma distribution.
CGammaDist(x,a,b) = P{t<x}, where t has gamma distribution with the shape parameter a, and the 'mean' parameter b.
5/11/2000
Columns The number of columns function.
Returns the number of columns in a matrix.
8/17/1999
Cos The cosine function. 8/17/1999
Erf The error function.
Erf(x)=2/Sqrt(Pi) Integral{0,x,Exp[-t^2]dt}
8/17/1999
Exp The exponential function.
Returns both numeric and matrix exponentials.
8/17/1999
Format Format is used to print a floating point number with a specified number of places of precision. The function returns a string containing the appropriate representation of the number. 'width' is the total length of the number string, 'places' is the number of decimal places to be printed. Format (x,width,places) is equivalent to sprintf ("%width.placesf",x); 5/11/2000
Gamma The gamma function.
Gamma[a] = Integral{0,Infinity, Exp[-x] x^(a-1)dx};
8/17/1999
GammaDist The gamma distrufunction.
GammaDist[x,a,b] = b^a/Gamma(a) Exp[-bx] x^(a-1).
8/17/1999
IBeta The incomplete beta function.
IBeta[x,p,q] = Integral{0,x, Gamma[p+q]/Gamma[p]Gamma[q] t^(p-1) (1-t)^(q-1)};
6/6/2001
IGamma The incomplete gamma function.
IGamma[a,x] = Integral{0,x, Exp[-t] t^(a-1)dt};
5/10/2000
InvChi2 The inverse Chi squared distribution.
InvChi2(r,n) = x, such that P(t<x)=r where t is a random variable distributed as Chi-squared with n degrees of freedom.
8/9/2002
Inverse The matrix inverse function.
8/17/1999
Log The natural (base 'eÕ) logarithm function.
8/17/1999
LUDecompose The LU matrix decomposition function.
Any non-degenerate square matrix can be 'uniqely'decomposed into the product of a lower triangular with an upper triangular matrices.
8/20/2002
LUSolve Solves systems of the form LUx = b. Performs a double back substitution to solve a system of linear equations. 8/20/2002
Max Returns the maximum of its arguments. 6/6/2001
Min Returns the minimum of its arguments. 6/6/2001
PSTreeString Returns a string containing a post script rendering of the tree. The length of the branches can be scaled on any model parameter (if it is defined for all branches), or left unscaled (all branches have equal length). The command also takes a page size parameter. 8/14/2002
Random The random number generation function.
Returns a random number of from a uniform distribution over [a,b].

8/17/1999
RerootTree Returns a string containing the Newick style string of the tree rerooted at a specified branch. 8/20/2002
Rows The number of rows function.
Returns the number of rows in a matrix.
Can also be used to count the number of objects of a given kind.
8/9/2002
Sin The sine function. 8/17/1999
Sqrt The square root function. 8/17/1999
Tan The tangent function. 8/17/1999
TEXTreeString Returns a string containing a LaTEX picture description of the tree. The length of the branches can be scaled on any model parameter (if it is defined for all branches), or left unscaled (all branches have equal length). 8/14/2002
Time The timer function.
Returns the value of the system timer in seconds.
5/11/2000
TipCount When applied to a tree variable, returns the number of tips(leaves) in the tree. 1/19/2000
TipName Returns a string containing the name of a tip of the tree. 5/11/2000
Transpose The matrix transpose function.
Returns the transpose of a matrix.
8/17/1999
ZCDF Cumulative distribution function of the standard normal random variable
ZCDF(x) = P{N(0,1)<x}
8/9/2002

 
Sergei L. Kosakovsky Pond and Spencer V. Muse, 1997-2002