Changelog
2013-10-08, version 0.14.0
math.options.matrix.default
which can have values
matrix
(default) or array
. This option is used by the functions eye
,
ones
, range
, and zeros
, to determine the type of matrix output.concat
.[...]
in the expression parser now creates 1 dimensional
matrices by default. math.eval('[1,2,3,4]')
returns a matrix with
size [4]
, math.eval('[1,2;3,4]')
returns a matrix with size [2,2]
.mod
(modulus operator).Changelog
2013-09-03, version 0.13.0
map
and forEach
. Thanks Sebastien Piquemal (@sebpic).subset
, it now only supports
Array, Matrix, and String.get
and set
from a selector, they are a duplicate
of the function subset
.get
and set
of Matrix
with a single function
subset
.math.expr
to math.expression
(contains Scope, Parser,
node objects).math.docs
to math.expression.docs
.math.expr.Selector
to math.chaining.Selector
.lcm
and xgcd
.Changelog
2013-08-22, version 0.12.1
Changelog
2013-08-22, version 0.12.0
random([min, max])
, randomInt([min, max])
,
pickRandom(array)
. Thanks Sebastien Piquemal (@sebpic).distribution(name)
, generating a distribution object
with functions random
, randomInt
, pickRandom
for different
distributions. Currently supporting uniform
and normal
.range
to exclude the upper bound, so range(1, 4)
now returns [1, 2, 3]
instead of [1, 2, 3, 4]
.range
, which is now range(start, end [, step])
instead of range(start, [step, ] end)
.ones
and zeros
to geometric dimensions, for
example ones(3)
returns a vector with length 3, filled with ones, and
ones(3,3)
returns a 2D array with size [3, 3].ones
and zeros
: they now return an Array when
arguments are Numbers or an Array, and returns a Matrix when the argument
is a Matrix.A[0, 0:3]
.Changelog
2013-07-23, version 0.11.0
concat
is now zero-based.true
and false
.boolean
.select
not accepting 0
as input.
Thanks Elijah Manor (@elijahmanor).[[], []]
.Changelog
2013-07-08, version 0.10.0
2i * 2i
now returns a
Number -4
instead of a Complex -4 + 0i
).help
function.size
and squeeze
now return a Matrix instead of an Array as
output on Matrix input.unaryminus
to unary
.Changelog
2013-06-14, version 0.9.1
emultiply
(x .* y
),
edivide
(x ./ y
), epow
(x .^ y
).Infinity
and NaN
.Changelog
2013-05-29, version 0.9.0
math.parse(expr [,scope])
. Optional parameter scope can
be a plain JavaScript Object containing variables.math.expr(expr [, scope])
with an additional parameter
scope
, similar to parse
. Example: math.eval('x^a', {x:3, a:2});
.subset
, to get or set a subset from a matrix, string,
or other data types.det
. Thanks Bryan Cuccioli (@bcuccioli).