Functions and commands 399
list2mat Returns a matrix of n columns made by splitting a list into
rows, each containing n terms. If the number of elements in
the list is not divisible by n, then the matrix is completed with
zeros.
list2mat(List, Integer)
Example:
list2mat({1,8,4,9},1) returns
lname Returns a list of the variables in an expression.
lname(Expr)
Example:
lname(exp(x)*2*sin(y)) gives [x,y]
lnexpand Returns the expanded form of a logarithmic expression.
lnexpand(Expr)
Example:
lnexpand(ln(3*x)) gives ln(3)+ln(x)
logarithmic_
regression
Given a set of points, returns a vector containing the
coefficients a and b of y=a*ln(x)+b, the natural logarithmic
function which best fits the set of points. The points may be the
elements in two lists or the rows of a matrix.
logarithmic_regression(Matrix) or
logarithmic_regression(List1, List2)
Example:
logarithmic_regression returns
[6.3299…, 0.7207…]
logb Returns the logarithm of base b of a.
logb(a,b)
Example:
logb(5,2) gives ln(5)/ln(2) which is approximately
2.32192809489
1
8
4
9
1.0 1.0
2.0 4.0
3.0 9.0
4.0 9.0