# Matrex Functions Templates

sys.date.add
adds a number (of days, hours, seconds...) to a date
Input Matrices (Min: 2 Max: 2):
date DATE the matrix of dates to add the periods to
period NUMERIC the periods to add
Output Matrices (Min: 1 Max: 1):
out DATE the output matrix
Parameters:
unit TEXT the unit of the period to add
Choices: SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR

sys.date.compose
composes dates matrix from year, month, day, hour, minute, second matrices
Input Matrices (Min: 3 Max: 6):
year NUMERIC the matrix containing the year values
month NUMERIC the matrix containing the month values
day NUMERIC the matrix containing the day values
hour NUMERIC the matrix containing the hour values
minute NUMERIC the matrix containing the minute values
second NUMERIC the matrix containing the second values
Output Matrices (Min: 1 Max: 1):
out DATE the return matrix containing the calculated dates

sys.date.extract
to extract a field value (year, month, ... second) from a date. Specify which field
you want to extract using the unit parameter
Input Matrices (Min: 1 Max: 1):
dates DATE the dates to extract the field from
Output Matrices (Min: 1 Max: 1):
out NUMERIC the value of the extracted field
Parameters:
unit TEXT the unit (year, month..., second) that you want to extract from the date
Choices: SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR

sys.date.fill
Fills the output matrix with the now, today, tomorrow value or other
The size of the output matrix is the same is given as parameters
Output Matrices (Min: 1 Max: 1):
out DATE the result matrix, containing the dates
Parameters:
type TEXT the type of value to fill the matrix with
Choices: TODAY,NOW,YESTERDAY,TOMORROW
sizeX NUMERIC the width of the output matrix
sizeY NUMERIC the height of the output matrix

sys.date.fillas
Fills the output matrix with the now, today, tomorrow value or other
The size of the output matrix is the same as the one of the input matrix
Input Matrices (Min: 1 Max: 1):
givesSize ANY gives the size of the output matrix
Output Matrices (Min: 1 Max: 1):
out DATE the matrix to fill with dates
Parameters:
type TEXT the type of the value to fill the matrix with
Choices: NOW,TODAY,YESTERDAY,TOMORROW

sys.date.format
formats a matrix of dates to a matrix of texts using the java.text.SimpleDateFormat formatter
Input Matrices (Min: 1 Max: 1):
in DATE the dates to format
Output Matrices (Min: 1 Max: 1):
out TEXT the formatted dates
Parameters:
pattern TEXT Pattern for java.text.SimpleDateFormat

sys.date.frommilliseconds
converts a matrix of milliseconds to a matrix of dates
Input Matrices (Min: 1 Max: 1):
ms NUMERIC the milliseconds matrix
Output Matrices (Min: 1 Max: 1):
out DATE the dates matrix

sys.date.interval
builds a date interval, i.e. a vector of dates from some parameters
Output Matrices (Min: 1 Max: 1):
out DATE the interval vector
Parameters:
start DATE the first date of the array
unit TEXT the unit for each step, (DAY, MONTH...)
Choices: SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR
unitsNumber NUMERIC the number of units for each step. You can have for example steps of 2 days
stepsNumber NUMERIC the number of steps, i.e. the number of elements of the final vector

sys.date.intervalas
builds a date/time interval with the size of another matrix
Input Matrices (Min: 1 Max: 1):
getSizeFrom ANY the matrix to make the interval the same size of
Output Matrices (Min: 1 Max: 1):
interval DATE the generated interval
Parameters:
start DATE the start of the interval (the first date of the array)
unit TEXT The unit for each step (MONTH, DAY...)
Choices: SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR
unitsNumber NUMERIC the number of units for each step. You can have for example steps of 2 days
whichSize TEXT which size of the input matrix (X or Y) to get as Y size of the array
Choices: x,y

sys.date.removetime
For each date in the input matrix, removes the time part of a date/time, leaving only the date part.
Input Matrices (Min: 1 Max: 1):
datetime DATE the date/time matrix
Output Matrices (Min: 1 Max: 1):
date DATE only the date part of the items in the 'datetime' matrix

sys.date.subtract
Subtracts the dates of the matrix 'what' from the dates of the matrix 'from'.
res[x,y] = from[x,y] - what[x,y].
The result is expressed in the time unit expressed by the 'unit' parameter (minutes, seconds...)
Input Matrices (Min: 2 Max: 2):
from DATE matrix with the dates to be subtracted from
what DATE The matrix with the dates to be subtracted
Output Matrices (Min: 1 Max: 1):
res NUMERIC the result matrix, containing the time difference between the dates in the 'unit' unit.
Parameters:
unit TEXT The unit of time in which the subtraction result is expressed
Choices: SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR

sys.date.tomilliseconds
transforms a matrix of dates to a matrix of the number of milliseconds from January 1, 1970 00:00:00 GMT (java.sql.Timestamp)
Input Matrices (Min: 1 Max: 1):
in DATE the matrix of dates
Output Matrices (Min: 1 Max: 1):
out NUMERIC the milliseconds for the in dates

sys.db.query
queries the database and transforms the result columns in matrices (arrays)
Output Matrices (Min: 1 Max: 64):
column ANY a column in the result of the query
Parameters:
driver TEXT driver class name
url TEXT database url
user TEXT database user
password TEXT database password
sql TEXT query sql

sys.db.update
To update tables in the database, inserting, updating or deleting rows, using update queries.
The query parameters are of the form ":" like in:

The input matrices give the values for the query parameters. They must be vectors of the same length.
The function loop on these vectors, calling the query with all the elements with index 0, then with all the elements with index 1 and so on.
So, for our example query suppose we have two input matrices with values:

bid: 15, 30, 60

The function executes the following queries:

insert into marketprice (ask, bid) vaiues (10, 15)
insert into marketprice (ask, bid) vaiues (20, 30)
insert into marketprice (ask, bid) vaiues (40, 60)

To make it possible to do the classical operation "update row if it exists, otherwise insert a new one", the function accepts a list of queries.
For each row, if the first query does not succeed (error or no row updated), it tries the second query, if it exists, the third and so on.

Input Matrices (Min: 0 Max: 64):
fieldvalue ANY a vector of values. Each of them is a parameter used to insert a new row in the database or update/delete rows in the databases.
Parameters:
driver TEXT jdbc driver class name
url TEXT jdbc database url
user TEXT user to access the database
password TEXT password to access the database
query1 TEXT The first query in the list of the queries to update the database. E.g. "insert into marketprice (ask, bid) vaiues (:ask, :bid)" where ask and bid are names of input matrices.
query2 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query3 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query4 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query5 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query6 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query7 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional
query8 TEXT Query to update the database. Executed if the previous query in the list did not succeed (error or no rows changed). See query1 for more information.
Optional

sys.generation.duplicate
The output matrix is a copy of the input one. Changes in the input matrix are reflected in the output one.
Used for example to "rename" the matrix, when a function (isql?) requires specific names.
Input Matrices (Min: 1 Max: 1):
toCopy ANY The matrix to copy
Output Matrices (Min: 1 Max: 1):
copy ANY the copy of toCopy

sys.generation.fill
fills the matrix with the same value in each cell
Output Matrices (Min: 1 Max: 1):
result ANY the matrix filled with the value
Parameters:
sizeX NUMERIC the x size of the matrix
sizeY NUMERIC The y size of the matrix
value TEXT the value of the matrix (converted to the matrix type)

sys.generation.fillas
fills the output matrix with the parameter value. The output matrix has the same size as the input matrix.
Input Matrices (Min: 1 Max: 1):
input ANY the input matrix (only needed to calculate the size of the output matrix)
Output Matrices (Min: 1 Max: 1):
result ANY the matrix filled with the given value
Parameters:
value TEXT the value to fill the matrix with (as a string)

sys.generation.gen
builds a matrix from a string.
The string passed as parameter must contain a CSV text of the form "a,b|c,d" where ',' is the columns separator and '|' is the line separator.
Used to get easy small matrices when working with the expression parser.
Output Matrices (Min: 1 Max: 1):
out ANY the output matrix containing the CSV text values.
Parameters:
csvtext TEXT the CSV text of the form "a,b|c,d"
columnSeparator TEXT it is normally , but you can use something else.
Optional
Choices: ,,;
lineSeparator TEXT separator of the lines in the CSV text. It none is given '|' is used.
Optional
Choices: |,#,%

sys.generation.interval
Creates an interval array starting from start, with step step and size
Output Matrices (Min: 1 Max: 1):
interval NUMERIC the vector that represents the interval
Parameters:
start NUMERIC the first number of the array
step NUMERIC the step (the number to sum to go from one item of the array to the next)
size NUMERIC the number of points in the interval

sys.generation.intervalas
builds a numeric interval with the size of another matrix
Input Matrices (Min: 1 Max: 1):
getSizeFrom ANY the matrix to make the interval the same size of
Output Matrices (Min: 1 Max: 1):
interval NUMERIC the generated interval
Parameters:
start NUMERIC the first item of the interval
step NUMERIC the step of the interval (distance between two near items of the array)
whichSize TEXT Get the X or Y size of the input matrix as Y size of the interval?
Choices: x,y

sys.generation.random
creates N matrices filled with random values
Output Matrices (Min: 1 Max: 1):
random NUMERIC a random matrix
Parameters:
sizeX NUMERIC the x size of the final matrix
sizeY NUMERIC the y size of the final matrix

sys.generation.randomas
generates a matrix with random values 0..1 of the same size of the input matrix
Input Matrices (Min: 1 Max: 1):
in ANY the matrix that gives the size of the generated matrix
Output Matrices (Min: 1 Max: 1):
out NUMERIC the matrix filled with random numbers 0..1

sys.generation.tile
tiles the output matrix with x * y copies of the input matrix
Input Matrices (Min: 1 Max: 1):
in ANY the matrix to use to tile out
Output Matrices (Min: 1 Max: 1):
out ANY the matrix result of the tiling
Parameters:
x NUMERIC the number of times the input matrix is replicated in the x axis
y NUMERIC the number of times the input matrix is replicated in the y axis

sys.generation.tileas
tiles the output matrix with x * y copies of the input matrix, where x and y are the size of the "as" input matrix
Input Matrices (Min: 2 Max: 2):
in ANY the matrix to use to tile out
as ANY the matrix the size of will be the the x,y times the in matrix is tiled
Output Matrices (Min: 1 Max: 1):
out ANY the result of the tiling

sys.import.csv
import CSV or SDV files
Output Matrices (Min: 1 Max: 64):
field ANY a field in each line of the file
Parameters:
path TEXT the path of the filename to read
separator TEXT the character which divides the fields in a line (, or ;)
Choices: ,,;

sys.logical.and
calculates the logical and of the two matrices element by element
Input Matrices (Min: 2 Max: 2):
a BOOLEAN the first and operand
b BOOLEAN The second and operand
Output Matrices (Min: 1 Max: 1):
out BOOLEAN the and result

sys.logical.if
Calculates the if(condition, then, else) element by element of the matrices condition, then, else
Input Matrices (Min: 3 Max: 3):
condition BOOLEAN the if condition
then ANY the matrix containing the values to return if the condition is true
else ANY the matrix containing the values to return if the condition is false
Output Matrices (Min: 1 Max: 1):
out ANY the if result

sys.logical.not
returns the NOT of each element of the input matrix
Input Matrices (Min: 1 Max: 1):
in BOOLEAN input matrix
Output Matrices (Min: 1 Max: 1):
not BOOLEAN matrix containing the items of in, NOT-ed

sys.logical.or
Calculates the logical or element by element of the two matrices
Input Matrices (Min: 2 Max: 2):
a BOOLEAN the first or operand
b BOOLEAN The second or operand
Output Matrices (Min: 1 Max: 1):
out BOOLEAN the or result

sys.mathstat.analysis.interpolator
Evaluates a function created interpolating some points.
The interpolation can be done using one of 3 different alogorithms (spline, neville, divided difference).
Input Matrices (Min: 3 Max: 3):
pointsX NUMERIC the points to interpolate (x values)
pointsY NUMERIC the points to interpolate (y values)
evaluateX NUMERIC the functions built with the interpolation is evaluated with these values, producing the output.
Output Matrices (Min: 1 Max: 1):
out NUMERIC the output of the interpolated function evaluation
Parameters:
type TEXT The algorithm used to interpolate the points.
Choices: SPLINE,NEVILLE,DIVIDED_DIFFERENCE

sys.mathstat.by.arithmeticmeanby
aggregates (in this case calculates the arithmetic mean) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.geometricmeanby
aggregates (in this case calculates the geometric mean) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.maxby
aggregates (in this case finds the max value) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.minby
aggregates (in this case finds the minimum value) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.productby
aggregates (in this case calculates the product) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.sumby
aggregates (in this case sums) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.by.varianceby
aggregates (in this case calculates the variance) the 'values' matrices [2..64] by the keys found in the first column of the 'keys' matrix
Input Matrices (Min: 2 Max: 64):
keys ANY the matrix containing in the first column the keys by which to aggregate the values of the other matrices.
values NUMERIC the values to be aggregated by the keys in the keys matrix
Output Matrices (Min: 2 Max: 64):
keys ANY the key input matrix with the keys sorted and unique
values NUMERIC the values aggregated by the keys in the keys matrix

sys.mathstat.distributions.binomial
calculates the probability functions of the binomial distribution
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC the probability function matrix
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
trials NUMERIC the number of trials
probabilityOfSuccess NUMERIC the probability of success

sys.mathstat.distributions.chisquared
calculates the probability functions of a chi-squared distribution
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input
Output Matrices (Min: 1 Max: 1):
y NUMERIC the chi squared distribution probability function for each point of the input
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
degreesOfFreedom NUMERIC the degrees of freedom of the chi-squared distribution

sys.mathstat.distributions.exponential
calculates the density functions of the exponential distribution
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input values
Output Matrices (Min: 1 Max: 1):
y NUMERIC the output values
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
mean NUMERIC the mean of the exponential distribution

sys.mathstat.distributions.hypergeometric
calculates the probability functions of the hypergeometric distribution
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC the probability function of the hypergeometric distribution
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
populationSize NUMERIC the population size
numberOfSuccesses NUMERIC the number of successes in the population
sampleSize NUMERIC the sample size

sys.mathstat.distributions.normal
calculates the probability functions of the normal distribution
Input Matrices (Min: 1 Max: 1):
input NUMERIC the points on the x axis for which the cumulative probability is calculated
Output Matrices (Min: 1 Max: 1):
cumulative_probability NUMERIC the cumulative probability
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
mean NUMERIC the mean parameter
standardDeviation NUMERIC the standard deviation

sys.mathstat.distributions.poisson
calculates the density functions of the poisson distribution
Input Matrices (Min: 1 Max: 1):
x NUMERIC input values of the function
Output Matrices (Min: 1 Max: 1):
y NUMERIC result of the function
Parameters:
type TEXT type of the density function calculated. PDF - probability density function CDF - cumulative density function
Choices: PDF,CDF
mean NUMERIC the mean of the distribution

sys.mathstat.optimization.cost.powell
calculates the powell cost function. Works for vectors that have size that is multiple of 4
Input Matrices (Min: 1 Max: 1):
x NUMERIC the vector to calculate the cost of. It must have size that is multiple of 4
Output Matrices (Min: 1 Max: 1):
cost NUMERIC the calculated cost

sys.mathstat.optimization.cost.rosenbrock
Calculates the Rosenbrock cost function for direct search optimizations.
Rosenbrock is applied to vectors of size 2.
Input Matrices (Min: 1 Max: 1):
x NUMERIC the vector of size 2 to calculate the cost of
Output Matrices (Min: 1 Max: 1):
cost NUMERIC the calculated cost

sys.mathstat.optimization.neldermead
Input Matrices (Min: 3 Max: 3):
vertexA NUMERIC the initial vertex
vertexB NUMERIC the final vertex
cost NUMERIC the cost of the last evaluation of the solver, calculated by an external function
Output Matrices (Min: 2 Max: 2):
evaluation NUMERIC the last evaluation of the solver. It is the result of the optimization if terminated is true
finalValues NUMERIC The values to which the solver converged. This matrix has value only when the optimization has terminated
Parameters:
maxEvaluations NUMERIC the maximum number of evaluations (times the cost function is called)
threshold NUMERIC when the difference of the cost of the last calculated vertices is less than this threshold, the algorithm has converged.
rho NUMERIC
Optional
khi NUMERIC
Optional
gamma NUMERIC
Optional
sigma NUMERIC
Optional

sys.mathstat.transform.fct
Calculates the Fast Cosine Transformation (FCT) for transformation of one-dimensional data sets.
Uses the FCT implementation in the Apache Common-Math library.
Input and output are real numbers vectors.
Input Matrices (Min: 1 Max: 1):
in NUMERIC The input vector. The number of elements must be power of 2 + 1 (e.g. 3, 5, 9,...)
Output Matrices (Min: 1 Max: 1):
out NUMERIC the output vector
Parameters:
type TEXT TRANSFORM: F_n = (1/2) [f_0 + (-1)^n f_N] + \Sigma_{k=0}^{N-1} f_k \cos(\pi nk/N) TRANSFORM2: F_n = \sqrt{1/2N} [f_0 + (-1)^n f_N] + \sqrt{2/N} \Sigma_{k=0}^{N-1} f_k \cos(\pi nk/N) INVERSE: f_k = (1/N) [F_0 + (-1)^k F_N] + (2/N) \Sigma_{n=0}^{N-1} F_n \cos(\pi nk/N) INVERSE2: f_k = \sqrt{1/2N} [F_0 + (-1)^k F_N] + \sqrt{2/N} \Sigma_{n=0}^{N-1} F_n \cos(\pi nk/N)
Choices: TRANSFORM,TRANSFORM2,INVERSE,INVERSE2

sys.mathstat.transform.fft
Calculates the Fast Fourier Transformation (FFT) for transformation of one-dimensional data sets.
Uses the FFT implementation in the Apache Common-Math library.
For reference: http://mathworld.wolfram.com/FastFourierTransform.html

The input can be either a real vector or a complex vector (broken in a real and an imaginary vectors).
The output is always a complex vector (broken in a real and an imaginary vectors).

Input Matrices (Min: 1 Max: 2):
inReal NUMERIC The real array (length must be power of 2) to be transformed
inImaginary NUMERIC The imaginary array (length must be power of 2) to be transformed. It is optional, meaning that the input can be real.
Output Matrices (Min: 2 Max: 2):
outReal NUMERIC The output is always a complex number. This is the real part.
outImaginary NUMERIC The output is always a complex number. This is the imaginary part.
Parameters:
type TEXT TRANSFORM: y_n = \Sigma_{k=0}^{N-1} e^{-2 \pi i nk/N} x_k TRANSFORM2: y_n = (1/\sqrt{N}) \Sigma_{k=0}^{N-1} e^{-2 \pi i nk/N} x_k
Choices: TRANSFORM,TRANSFORM2,INVERSE,INVERSE2

sys.mathstat.transform.fst
Calculates the Fast Sine Transformation (FST) for transformation of one-dimensional data sets.
Uses the FST implementation in the Apache Common-Math library.

Input and output are real numbers vectors.
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input vector. Must have a number of elements that is power of 2
Output Matrices (Min: 1 Max: 1):
out NUMERIC the output vector
Parameters:
type TEXT TRANSFORM: F_n = \Sigma_{k=0}^{N-1} f_k \sin(\pi nk/N) TRANSFORM2: F_n = \sqrt{2/N} \Sigma_{k=0}^{N-1} f_k \sin(\pi nk/N) INVERSE: f_k = (2/N) \Sigma_{n=0}^{N-1} F_n \sin(\pi nk/N) INVERSE2: f_k = \sqrt{2/N} \Sigma_{n=0}^{N-1} F_n \sin(\pi nk/N)
Choices: TRANSFORM,TRANSFORM2,INVERSE,INVERSE2

sys.mathstat.arithmeticmean
Calculates the arithmetic means of the columns of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC an array which contains the arithmetic mean of each column of the matrix x

sys.mathstat.geometricmean
calculates the geometric means of the columns of the input matrix
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
mean NUMERIC the vector of geometric means

sys.mathstat.iterativesum
sums iteratively all the items of the input matrix by column
So, if you have the vector [1,2,3] as input, the output will be [1,3,6]
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC a matrix every item of which is the sum of the same item and the previous items of the x matrix, by column

sys.mathstat.max
Calculates the maximum element of each column of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC an array containing the maximums of the items of each column of the x matrix

sys.mathstat.min
Calculates the minimum element of each column of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC an array containing the minimums of the item of each column of the x matrix

sys.mathstat.product
Calculates the product of all numbers in each column of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC an array that contains the product of the item of each column of x

sys.mathstat.sum
sum the values in the columns of the matrix
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
sum NUMERIC a vector which is the sum of the columns of the matrix

sys.mathstat.variance
calculates the variance of each column of the matrix
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
variance NUMERIC a vector containing the variances of the columns of the matrix

sys.matrix.determinant
the matrix determinant
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
determinant NUMERIC calculates the matrix determinant

sys.matrix.identity
builds an identity matrix of the given size
Input Matrices (Min: 1 Max: 1):
size NUMERIC size of the identity matrix (must be 1x1)
Output Matrices (Min: 1 Max: 1):
identity NUMERIC the identity matrix

sys.matrix.identityas
builds an indentity matrix (1 in the diagonal, 0 everywhere else) using the size of the original matrix
Input Matrices (Min: 1 Max: 1):
size ANY The matrix that has the same x or y size of the output identity matrix
Output Matrices (Min: 1 Max: 1):
identity NUMERIC The identity matrix
Parameters:
which TEXT Use the size of the x or y axis of the original matrix as size of the identity matrix?
Choices: x,y

sys.matrix.inverse
calculates the matrix inverse
Input Matrices (Min: 1 Max: 1):
toInvert NUMERIC the matrix to invert
Output Matrices (Min: 1 Max: 1):
inverted NUMERIC the result of the inversion

sys.matrix.norm
the maximum absolute row sum norm of the matrix
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
norm NUMERIC the matrix norm

sys.matrix.qrdecomposition
Calculates the QR-decomposition of a matrix. In the QR-decomposition of a matrix A consists of two matrices Q and R that satisfy: A = QR, Q is orthogonal (QTQ = I), and R is upper triangular.
Uses the common-math library

Input Matrices (Min: 1 Max: 1):
in NUMERIC the matrix to decompose
Output Matrices (Min: 2 Max: 2):
q NUMERIC the q matrix
r NUMERIC the r matrix

sys.matrix.solve
Returns a matrix of (column) solution vectors for linear systems.
Input Matrices (Min: 2 Max: 2):
coefficient NUMERIC coefficient matrix
constant NUMERIC constant vectors
Output Matrices (Min: 1 Max: 1):
solution NUMERIC the result of the solve method

sys.matrix.times
matrix multiplication
Input Matrices (Min: 2 Max: 2):
mat1 NUMERIC matrix to multiply
mat2 NUMERIC matrix to multiply
Output Matrices (Min: 1 Max: 1):
result NUMERIC multiplication result

sys.matrix.transpose
Transposes the input numerical matrix
Input Matrices (Min: 1 Max: 1):
totranspose NUMERIC the matrix to transpose
Output Matrices (Min: 1 Max: 1):
transposed NUMERIC the transposed matrix

sys.sql.isql
SQL select in memory, that works on matrices 1xN (vectorial matrices). Use SQL to filter, sort, group values on matrices. Matrices are grouped in tables (equivalent to database tables), of which they become columns. More in the "internalsql.pdf" document. Example:

select price.ticker as ticker, sum(price.fix) as sumfix from [ticker, fix] as price group by price.ticker
Input Matrices (Min: 0 Max: 64):
input ANY input vectorial matrix that becomes a column of a table in the query
Output Matrices (Min: 0 Max: 64):
output ANY The output matrices (as... in the select clause)
Parameters:
sql TEXT the sql select query

sys.standard.minmax.max
Returns the maximum of the numbers in the same position of a set of matrices
r[x][y] = max (m0[x][y],m1[x][y]...)
Input Matrices (Min: 1 Max: 64):
matrix NUMERIC one of the matrices in the set from which this function extracts the manimum
Output Matrices (Min: 1 Max: 1):
max NUMERIC The matrix each element of which is the maximum of the elements in the same position of the input matrices

sys.standard.minmax.min
Returns the minimum of the numbers in the same position of a set of matrices
r[x][y] = min (m0[x][y],m1[x][y]...)
Input Matrices (Min: 1 Max: 64):
matrix NUMERIC one of the matrices in the set from which this function extracts the minimum.
Output Matrices (Min: 1 Max: 1):
min NUMERIC The matrix each element of which is the minimum of the elements in the same position of the input matrices

sys.standard.minmax.nthmax
Returns the nth maximum (0-based) of the numbers in the same position of a set of matrices
r[x][y] = maxN (m1[x][y],m2[x][y]...) where N is m0[x][y] (the first input matrix)
Input Matrices (Min: 2 Max: 64):
n NUMERIC Defines what is the n when we choose the nth maximum number for the items in the same [x,y] of all input matrices
matrix NUMERIC one of the matrices in the set from which this function extracts the nth minimum.
Output Matrices (Min: 1 Max: 1):
nthmax NUMERIC The matrix each element of which is the nth maximum of the elements in the same position of the input matrices

sys.standard.minmax.nthmin
Returns the nth minimum (0-based) of the numbers in the same position of a set of matrices
r[x][y] = minN (m1[x][y],m2[x][y]...) where N is m0[x][y] (the first input matrix)
Input Matrices (Min: 2 Max: 64):
n NUMERIC Defines what is the n when we choose the nth minimum number for the items in the same [x,y] of all input matrices
matrix NUMERIC one of the matrices in the set from which this function extracts the nth minimum.
Output Matrices (Min: 1 Max: 1):
nthmin NUMERIC The matrix each element of which is the nth minimum of the elements in the same position of the input matrices

sys.standard.test.iseven
Checks if the numbers in the input matrix are even (N%2=0). The decimal part of the number is not considered.
Input Matrices (Min: 1 Max: 1):
numbers NUMERIC the numbers to check for being even
Output Matrices (Min: 1 Max: 1):
iseven BOOLEAN for each text in 'numbers' tells if it is even.

sys.standard.test.isodd
Checks if the numbers in the input matrix are odd (N%1=0). The decimal part of the number is not considered.
Input Matrices (Min: 1 Max: 1):
numbers NUMERIC the numbers to check for being odd
Output Matrices (Min: 1 Max: 1):
isodd BOOLEAN for each text in 'numbers' tells if it is odd.

sys.standard.trigonometric.acos
calculates the acos function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC acos(x)

sys.standard.trigonometric.acosh
calculates the acosh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC acosh(x)

sys.standard.trigonometric.asin
calculates the asin function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC asin(x)

sys.standard.trigonometric.asinh
calculates the asinh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC asinh(x)

sys.standard.trigonometric.atan
calculates the atan function for each item of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC atan(x)

sys.standard.trigonometric.atanh
calculates the atanh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC atanh(x)

sys.standard.trigonometric.cos
calculates the cos function for each item of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the matrix to get the cosinus of
Output Matrices (Min: 1 Max: 1):
cosinus NUMERIC the cosinus of x

sys.standard.trigonometric.cosh
calculates the cosh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC cosh(x)

sys.standard.trigonometric.sin
calculates the sin function for each item of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the matrix to get the sinus of
Output Matrices (Min: 1 Max: 1):
sinus NUMERIC the sinus of x

sys.standard.trigonometric.sinh
calculates the sinh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC sinh(x)

sys.standard.trigonometric.tan
calculates the tangent function for each item of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the matrix to get the tangent of
Output Matrices (Min: 1 Max: 1):
tangent NUMERIC the tangent of x

sys.standard.trigonometric.tanh
calculates the tanh function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC tanh(x)

sys.standard.abs
abs(x) absolute value of each element of the matrix
Input Matrices (Min: 1 Max: 1):
toabs NUMERIC the matrix to get the absolute value of
Output Matrices (Min: 1 Max: 1):
result NUMERIC the absolute value of the matrix

sys.standard.binarybyblock
Given the matrix 'byBlocks', which has width and/or height that is multiple than the matrix 'whole',
applies a function (plus, minus...) to to each block of 'byBlock' that has the same size as 'whole'
E.g.
byBlock a b c d whole A B Result a+A b+B c+A d+B
e f g h C D e+C e+D g+C h+D
i j k l i+A j+B k+A l+B
m n o p m+C n+D o+C p+D
Input Matrices (Min: 2 Max: 2):
byBlock NUMERIC to divide in blocks of the same size as 'whole'
whole NUMERIC to consider as it is
Output Matrices (Min: 1 Max: 1):
result NUMERIC same size as byBlock
Parameters:
type TEXT the binary function to apply to each cell of the block and the matrix
Choices: plus,minus,times,divide,pow
order TEXT matrix x is divided by blocks, x is consider as it is. The order of the parameters for functions like 'minus' and 'divide' is then important.
Choices: f(x,y),f(y,x)

sys.standard.ceil
calculates the ceil (the smallest integer number > x) function for each element of the input matrix.
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC ceil(x)

sys.standard.changebase
Converts the numbers in the 'numbers' matrix to a different base (e.g. from base 10 (decimal) to base 16 (hexadecimal)).
out[x,y] = changebase(numbers[x,y], frombase, tobase)

E.g.
changebase([F, A] , 16, 10) => [15, 10]
Input Matrices (Min: 1 Max: 1):
numbers TEXT The numbers in the original base. They have to be written as texts, since the numbers written in some base (e.g. 16) contain letters.
Output Matrices (Min: 1 Max: 1):
out TEXT the numbers converted to the final base. This matrix must be textual for the same reason as for 'numbers'
Parameters:
basefrom NUMERIC the original base of the numbers
baseto NUMERIC the base to which the numbers have to be converted

sys.standard.closesteven
Finds the closest even integer (up or down) to each number of the matrix

res[x,y] = closest(val[x, y])
Input Matrices (Min: 1 Max: 1):
x NUMERIC the matrix to get the 'closest even' of
Output Matrices (Min: 1 Max: 1):
res NUMERIC the matrix composed by the closest even numbers
Parameters:
direction TEXT the direction used to search for the next even number. DOWN means that it searches for a smaller number, UP for a bigger number
Choices: UP,DOWN

sys.standard.closestodd
Finds the closest odd integer (up or down) to each number of the matrix

res[x,y] = closest(val[x, y])
Input Matrices (Min: 1 Max: 1):
x NUMERIC the matrix to get the 'closest odd' of
Output Matrices (Min: 1 Max: 1):
res NUMERIC the matrix composed by the closest odd numbers
Parameters:
direction TEXT the direction used to search for the next even number. DOWN means that it searches for a smaller number, UP for a bigger number
Choices: UP,DOWN

sys.standard.constant
Fills the result matrix with the given constant (pi, e...)
Output Matrices (Min: 1 Max: 1):
result NUMERIC the result matrix containing the given costant
Parameters:
constant TEXT the constant that to fill the result matrix with
Choices: PI,E
sizeX NUMERIC the x size of the result matrix (width)
sizeY NUMERIC The y size of the result matrix (height)

sys.standard.constantas
Fills the result matrix with the given constant (pi, e...). The result matrix has the same size as the input matrix.
Input Matrices (Min: 1 Max: 1):
size ANY uses the size of this matrix as size of the result matrix
Output Matrices (Min: 1 Max: 1):
constant NUMERIC the result matrix
Parameters:
constant TEXT the constant that to fill the result matrix with
Choices: PI,E

sys.standard.degrees
convert each element of the input matrix from radians to degrees
Input Matrices (Min: 1 Max: 1):
in NUMERIC the matrix of radians to convert
Output Matrices (Min: 1 Max: 1):
out NUMERIC the degrees of each element of the input matrix

sys.standard.div
integer division, element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC to divide
b NUMERIC to divide for
Output Matrices (Min: 1 Max: 1):
out NUMERIC division result

sys.standard.divide
divides the matrix 'what' by the matrix 'by' element by element
Input Matrices (Min: 2 Max: 2):
what NUMERIC the matrix to divide
by NUMERIC the matrix to divide by
Output Matrices (Min: 1 Max: 1):
result NUMERIC the division result

sys.standard.equal
for each cell of the two input matrices (which need to have the same size) tells if the value is equal.
Input Matrices (Min: 2 Max: 2):
a NUMERIC matrix to compare
b NUMERIC matrix to compare
Output Matrices (Min: 1 Max: 1):
isequal BOOLEAN contains a boolean value for each pair of values , which tells if the two values are equal

sys.standard.exp
calculates the exponential function for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
toexp NUMERIC the number to get the exponential of
Output Matrices (Min: 1 Max: 1):
result NUMERIC the result of the exponential

sys.standard.factorial
Calculates the factorial (n!) of the input matrix. The input values will be truncated to integers.
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
fact NUMERIC the factorial for each input value

sys.standard.factorial2
Calculates the double factorial (n!!) of the input matrix. The input values will be truncated to integers.
Input Matrices (Min: 1 Max: 1):
in NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
fact2 NUMERIC the double factorial for each input value

sys.standard.floor
calculates the floor function (the greatest integer number < x) for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC floor(x)

sys.standard.gcd
for each pair of numbers in the two input matrices calculates the greatest common divisor

res[x, y] = gcd(a[x,y], b[x,y])
Input Matrices (Min: 2 Max: 2):
a NUMERIC the matrix to calculate the gcd for together with b
b NUMERIC the matrix to calculate the gcd for together with a
Output Matrices (Min: 1 Max: 1):
res NUMERIC the gcd of the numbers in a and b

sys.standard.lcm
for each pair of numbers in the two input matrices calculates the lowest common multiplier

res[x, y] = lcm(a[x,y], b[x,y])
Input Matrices (Min: 2 Max: 2):
a NUMERIC the matrix to calculate the lcm for together with b
b NUMERIC the matrix to calculate the lcm for together with a
Output Matrices (Min: 1 Max: 1):
res NUMERIC the lcm of the numbers in a and b

sys.standard.less
verifies a < b element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC the first matrix to compare
b NUMERIC the second matrix to compare
Output Matrices (Min: 1 Max: 1):
result BOOLEAN true if a < b

sys.standard.lesseq
verifies a <= b element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC the first matrix to compare
b NUMERIC the second matrix to compare
Output Matrices (Min: 1 Max: 1):
result BOOLEAN true if a <= b

sys.standard.log
calculates the logarithm for each element of the input matrix
Input Matrices (Min: 1 Max: 1):
tolog NUMERIC the number to get the logarithm of
Output Matrices (Min: 1 Max: 1):
result NUMERIC the logarithm

sys.standard.logbase
Calculates the logarithm of a in base b, for each items of a and b

l[x,y] = log(a[x,y], b[x,y])
Input Matrices (Min: 2 Max: 2):
x NUMERIC the value to get the logarithm of
base NUMERIC the logarithm's base
Output Matrices (Min: 1 Max: 1):
y NUMERIC the calculated logarithm

sys.standard.minus
subtracts the two matrices element by element
Input Matrices (Min: 2 Max: 2):
difffrom NUMERIC the number to remove from
diffwhat NUMERIC the number to remove
Output Matrices (Min: 1 Max: 1):
result NUMERIC the difference

sys.standard.minus1
calculates the opposite of each element of the input matrix
Input Matrices (Min: 1 Max: 1):
original NUMERIC original matrix
Output Matrices (Min: 1 Max: 1):
minus NUMERIC opposite of the original

sys.standard.mod
integer module: a mod b, a % b element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC to mod
b NUMERIC to mod with
Output Matrices (Min: 1 Max: 1):
out NUMERIC the result of the module operation

sys.standard.more
verifies a > b element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC the first matrix to compare
b NUMERIC the second matrix to compare
Output Matrices (Min: 1 Max: 1):
result BOOLEAN true if > b is true

sys.standard.moreeq
verifies a >= b element by element
Input Matrices (Min: 2 Max: 2):
a NUMERIC the first matrix to compare
b NUMERIC the second matrix to compare
Output Matrices (Min: 1 Max: 1):
result BOOLEAN true if a >= b

sys.standard.plus
sums the two matrices element by element (must be the same size)
Input Matrices (Min: 2 Max: 2):
addendum1 NUMERIC the first sum addendum
addendum2 NUMERIC the second sum addendum
Output Matrices (Min: 1 Max: 1):
result NUMERIC the sum result

sys.standard.pow
pow(x, y) power of by y
Input Matrices (Min: 2 Max: 2):
x NUMERIC the matrix to get the power of
y NUMERIC the matrix to use as power
Output Matrices (Min: 1 Max: 1):
result NUMERIC the result matrix

sys.standard.radians
converts each element of the input matrix from degrees to radians
Input Matrices (Min: 1 Max: 1):
in NUMERIC the matrix of numbers expressed as degrees
Output Matrices (Min: 1 Max: 1):
out NUMERIC the matrix of numbers converted to radians

sys.standard.round
calculates the round function for each element of the input matrix.
Input Matrices (Min: 1 Max: 1):
x NUMERIC the input matrix
Output Matrices (Min: 1 Max: 1):
y NUMERIC round(x)

sys.standard.sign
for each element in the matrix, give -1 for a negative number, 1 for positive, 0 for 0.
Input Matrices (Min: 1 Max: 1):
in NUMERIC the matrix to calculate the signum of
Output Matrices (Min: 1 Max: 1):
out NUMERIC the signum of the input matrix

sys.standard.sqrt
calculates the square root of each element of the input matrix
Input Matrices (Min: 1 Max: 1):
input NUMERIC to get the square root of
Output Matrices (Min: 1 Max: 1):
result NUMERIC the square root

sys.standard.times
multiplies the matrices element by element
Input Matrices (Min: 2 Max: 2):
mat1 NUMERIC the first matrix to multiply
mat2 NUMERIC the second matrix to multiply
Output Matrices (Min: 1 Max: 1):
result NUMERIC the multiplication result

sys.standard.trunc
truncates each number in the matrix to its closest integer value
Input Matrices (Min: 1 Max: 1):
in NUMERIC the (real) numbers to truncate
Output Matrices (Min: 1 Max: 1):
out NUMERIC the integer values result of the truncation

sys.string.chars.charstocodes
Converts a matrix of chars to their equivalent codes (ascii, unicode).
e.g. ["a", "b"] -> [97, 98]
Input Matrices (Min: 1 Max: 1):
chars TEXT a matrix with as items single characters
Output Matrices (Min: 1 Max: 1):
codes NUMERIC Contains the (ascii, unicode) codes for the characters in the 'chars' matrix.

sys.string.chars.charstostring
Each column of the input matrix is a text, one character for each cell.
For example: 'd', 'o', 'g'.
This functions builds the related strings:
'd','o','g' => "dog".
The result matrix is actually a vector (one column), containing for each element the string built from the column with the same position in the input matrix:

Out[y] = string(Input.Column[x])
Input Matrices (Min: 1 Max: 1):
chars TEXT Each column contains the characters of a text
Output Matrices (Min: 1 Max: 1):
strings TEXT A vector (only one column). Each item is a string built with the characters in the column with the same position in the 'chars' matrix
Parameters:
trimmableChar TEXT The function removes this character if found at the end of one of the result strings.
Optional

sys.string.chars.codestochars
Converts a matrix of codes (ascii, unicode) to a matrix of chars
e.g. [97, 98] -> ["a", "b"]
Input Matrices (Min: 1 Max: 1):
codes NUMERIC a matrix with as items ascii/unicode codes (numbers)
Output Matrices (Min: 1 Max: 1):
chars TEXT Contains characters for the ascii/unicode codes in the 'codes' matrix.

sys.string.chars.codestostring
Each column of the input matrix is a text expressed in (ascii/unicode) codes, one code for each cell.
For example: [100, 111, 103].
This functions builds the related strings:
[100, 111, 103] => "dog".
The result matrix is actually a vector (one column), containing for each cell the string built from the column with the same position in the input matrix:

Out[y] = string(Input.Column[x])
Input Matrices (Min: 1 Max: 1):
codes NUMERIC Each column contains the (ascii/unicode) codes of a text
Output Matrices (Min: 1 Max: 1):
strings TEXT A vector (only one column). Each item is a string built with the (ascii/unicode) in the column with the same position in the 'codes' matrix
Parameters:
trimmablecode NUMERIC The function removes the character with this code if found at the end of one of the result strings.)
Optional

sys.string.chars.stringtochars
Converts each string in the input vector to the sequence of its letters.

Out.Column[x] = chars(In.value[y])

Since not all strings have the same lenght, there will be "holes" in the final
matrix. These will be filled with the parameter character or, if it is not given, with space
Input Matrices (Min: 1 Max: 1):
stringvector TEXT a vector of strings (only the first column has values)
Output Matrices (Min: 1 Max: 1):
chars TEXT One column for each string in the input matrix, containing the characters of the string.
Parameters:
defaultchar TEXT The character used to fill the "holes" in the output matrix, where the string is not long enough to cover all the items of the column.
Optional

sys.string.chars.stringtocodes
Converts each string in the input vector to the sequence of codes (ascii/unicode) of its letters.

Out.Column[x] = codes(In.value[y])

Since not all strings have the same lenght, there will be "wholes" in the final
matrix. These will be filled with the parameter code or, if it is not given, with -1
Input Matrices (Min: 1 Max: 1):
stringvector TEXT a vector of strings (only the first column has values)
Output Matrices (Min: 1 Max: 1):
codes NUMERIC One column for each string in the input matrix, containing the (ascii/unicode) codes of the string.
Parameters:
defaultCode NUMERIC The (ascii/unicode) code used to fill the "holes" in the output matrix, where the string is not long enough to cover all cells of the column
Optional

sys.string.regex.find
Matches the strings in the input matrix with the given regex pattern, returning the first found subsequence

out[x,y] = findregex(in[x,y])
Input Matrices (Min: 1 Max: 1):
in TEXT the matrix containing the text to be matched with the regex pattern
Output Matrices (Min: 1 Max: 1):
out TEXT contains the texts found in the 'in' matrix, using the regex pattern.
Parameters:
pattern TEXT the regular expression pattern to match agains each string in the input matrix

sys.string.regex.replace
For each string in the input matrix, Replaces the part matched by the given regex pattern with the replacement string

out[x,y] = replaceregex(in[x,y], replacement[x,y], pattern)
Input Matrices (Min: 2 Max: 2):
in TEXT the matrix containing the texts which get partially replaced using the pattern.
replacement TEXT the texts used to replace the part of the 'in' texts matched by the pattern
Output Matrices (Min: 1 Max: 1):
out TEXT the result of the replacement in the 'in' texts.
Parameters:
pattern TEXT the regular expression pattern to match agains each string in the input matrix

sys.string.test.isboolean
Checks if the text values in the input matrix are parsable as boolean.
It parses the texts using the Matrex default boolean format.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to parse
Output Matrices (Min: 1 Max: 1):
isboolean BOOLEAN for each text in 'texts' tels if it can be parsed as a boolean value.

sys.string.test.isdate
Checks if the text values in the input matrix are parsable as dates.
It parses the texts using the Matrex default dates format.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to parse
Output Matrices (Min: 1 Max: 1):
isdate BOOLEAN for each text in 'texts' tels if it can be parsed as a date

sys.string.test.isinteger
Checks if the text values in the input matrix are parsable as integer numbers.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to parse
Output Matrices (Min: 1 Max: 1):
isinteger BOOLEAN for each text in 'texts' tels if it can be parsed as an integer value.

sys.string.test.isnumeric
Checks if the text values in the input matrix are parsable as numeric values.
It parses the texts using the Matrex default numeric format.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to parse
Output Matrices (Min: 1 Max: 1):
isnumeric BOOLEAN for each text in 'texts' tels if it can be parsed as a numeric value.

sys.string.cat
concatenates the texts of two or more matrices element by element
Input Matrices (Min: 1 Max: 64):
text TEXT the text to concatenate
Output Matrices (Min: 1 Max: 1):
result TEXT the concatenation result

sys.string.compare
Compare the strings of two matrices lexicographically, element by element. (See the java function compareTo)
Input Matrices (Min: 2 Max: 2):
a TEXT the first matrix with the texts to compare
b TEXT the second matrix with the texts to compare
Output Matrices (Min: 1 Max: 1):
out NUMERIC the comparison result

sys.string.equals
tells if the strings in the two matrices are the same element by element
Input Matrices (Min: 2 Max: 2):
a TEXT the first matrix to compare
b TEXT the second matrix to compare
Output Matrices (Min: 1 Max: 1):
out BOOLEAN each element is true if the related elements in a and b are equal

sys.string.equalsignorecase
tells if the strings in the two matrices are the same element by element, when compared ignoring the letters case.
Input Matrices (Min: 2 Max: 2):
a TEXT the first matrix to compare
b TEXT the second matrix to compare
Output Matrices (Min: 1 Max: 1):
out BOOLEAN (each element is true if the related elements in a and b are equal ignoring the case.

sys.string.find
In each string of the 'text' matrix finds the related string in the 'tofind' matrix.
It returns the 0 based position of the first occurence of the 'tofind' string in the 'text' string, -1 if not found.
out[x,y] = find(text[x,y], tofind[x,y])

E.g.:
find([house, scary], [use,car]) -> [2,1]

Input Matrices (Min: 2 Max: 2):
text TEXT the matrix containing the strings that will be searched for the strings in 'tofind'
tofind TEXT The strings that will be searched in the related strings in 'text'
Output Matrices (Min: 1 Max: 1):
index NUMERIC for pair of strings in 'text' and 'tofind', the position of the 'tofind' string in the 'text' string.

sys.string.len
returns a matrix containing the lengths of all the strings in the input matrix.
len[x,y] = lenght(strings[x,y])
Input Matrices (Min: 1 Max: 1):
strings TEXT the strings to get the length of
Output Matrices (Min: 1 Max: 1):
len NUMERIC contains the length of each string in the 'string' matrix

sys.string.lowercase
convert all the strings of the input matrix to lowercase
Input Matrices (Min: 1 Max: 1):
in TEXT the matrix to convert to lowercase
Output Matrices (Min: 1 Max: 1):
out TEXT the lowercase matrix

sys.string.repeat
repeats each text in the text matrix by the number of times in the times matrix
result[x,y] = text[x,y] * times[x,y]
E.g. [dog, cat] * [3, 2] -> [dogdogdog, catcat]
Input Matrices (Min: 2 Max: 2):
text TEXT the texts to repeat
times NUMERIC the times in which the texts have to be repeated
Output Matrices (Min: 1 Max: 1):
out TEXT cell by cell, the texts in the 'texts' matrix, repeated by the times in the 'times' matrix.

sys.string.replace
Replaces a sequence of characters in the input text with another text.
The sequence to replace is defined by the matrices 'from' and 'until', where 'from' is the index of the first characted to be replaced, 'until' is the index of the character after the last one to be replaced.
The text used as replacement are in the 'replacement' matrix.
Out[x,y] = replace(In[x,y], From[x,y], Until[x,y], Replacement[x,y])
Input Matrices (Min: 4 Max: 4):
in TEXT the matrix containing the texts that get partially replaced.
replacement TEXT the texts used to replace the selected characters in the 'in' texts.
from NUMERIC the index of the first characted to be replaced
until NUMERIC the index of the first character not being replaced (the last characted replaced has index = 'until'-1)
Output Matrices (Min: 1 Max: 1):
out TEXT The texts used to replace the selected characters in the 'in' matrix

sys.string.substring
for each string in the matrix, calculates its substring using the String.substring function in java.

String.substring(begin) if the end parameter is not given
String.substring(begin,end) otherwise

The calculation terminates with an error and does not give a result if the parameters are out of the bounds of the original string.
Input Matrices (Min: 1 Max: 1):
in TEXT the input matrix containing the strings to substring
Output Matrices (Min: 1 Max: 1):
out TEXT the result of the substring operation
Parameters:
begin NUMERIC the start of the substring (0-based)
end NUMERIC the end of the substring, excluded (0-based). If not entered, the whole string is considered
Optional

sys.string.substringby
for each string in the "in" matrix, calculates its substring using the String.substring function in java.
It used the "begin" and optionally the "end" matrices to determine which part of the string to extract.
If "end" is not set, the substring contains all the characters of the original string starting from the index defined in "begin".

The calculation terminates with an error and does not give a result if the indices are out of the bounds of the original string.
Input Matrices (Min: 2 Max: 3):
in TEXT Contains the strings to extract the substrings from
begin NUMERIC for each string in the "in" matrix, contains the zero-based index, in the string, of the first character of the extracted substring
end NUMERIC for each string in the "in" matrix, contains the zero-based index, in the string, of the first character not in extracted substring (last + 1)
Output Matrices (Min: 1 Max: 1):
out TEXT for each string in the "in" matrix, contains the substing extracted from it

sys.string.trim
trims all the strings in the input matrix string by string
Input Matrices (Min: 1 Max: 1):
in TEXT the matrix with the strings to trim
Output Matrices (Min: 1 Max: 1):
out TEXT trimmed strings

sys.string.trimleft
left-trims every text in the matrix: removes all spaces at the start of each text.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to trim
Output Matrices (Min: 1 Max: 1):
trimmed TEXT the trimmed texts

sys.string.trimright
right-trims every text in the matrix: removes all spaces at the end of each text.
Input Matrices (Min: 1 Max: 1):
texts TEXT the texts to trim
Output Matrices (Min: 1 Max: 1):
trimmed TEXT the trimmed texts

sys.string.uppercase
convert all the strings in the input matrix to uppercase
Input Matrices (Min: 1 Max: 1):
in TEXT the matrix to uppercase
Output Matrices (Min: 1 Max: 1):
out TEXT the uppercased matrix

sys.string.uppercasefirst
For all the strings in the input matrix, changes the case of the first letter to uppercase.
out[x,y] = uppercasefirst(in[x,y])
Input Matrices (Min: 1 Max: 1):
strings TEXT the strings that get their first letter changed to uppercase
Output Matrices (Min: 1 Max: 1):
out TEXT the uppercased strings

sys.util.at
to get the values in matrixItem that have coordinates x,y, where x and y are in the matrices matrixX and matrixY. If matrixX is not given, then 0 is assumed as x coordinate, which works fine for vectors
Input Matrices (Min: 2 Max: 3):
items ANY the matrix containing the items to copy to the output matrix
y NUMERIC the y coordinates
x NUMERIC the x coordinate
Output Matrices (Min: 1 Max: 1):
out ANY the output matrix containing the values items(x,y)

sys.util.convertunit
Converts the values in the input matrix from a measurement unit to another.

out[x,y]=convertunit(in[x,y],unitfrom, unitto)

Availabe units grouped by type:

angstrom
foot
inch
meter
mile
nautical_league
yard

fluid_ounce
gallon
liter
pint_uk
pint_us
quart

horsepower
watt

gauss
tesla

day
hour
minute
second
year

atomic_mass
kilogram
ounce
pound

dyne
newton
pound_force

atmosphere
mercury_mm
pascal

calorie
electronvolt
horsepower_hour
joule
pound_foot
watt_hour
Input Matrices (Min: 1 Max: 1):
in NUMERIC the values in the original measurement unit
Output Matrices (Min: 1 Max: 1):
out NUMERIC the values in the 'in' matrix converted to the final measurement unit.
Parameters:
unitfrom TEXT the original measurement unit
Choices: angstrom,atmosphere,atomic_mass,calorie,day,dyne,electronvolt,fluid_ounce,foot,gallon,gauss,horsepower,horsepower_hour,hour,inch,joule,kilogram,liter,mercury_mm,meter,mile,minute,nautical_league,newton,ounce,pascal,pint_uk,pint_us,pound,pound_foot,pound_force,quart,second,tesla,watt,watt_hour,yard,year
unitto TEXT the final measurement unit
Choices: angstrom,atmosphere,atomic_mass,calorie,day,dyne,electronvolt,fluid_ounce,foot,gallon,gauss,horsepower,horsepower_hour,hour,inch,joule,kilogram,liter,mercury_mm,meter,mile,minute,nautical_league,newton,ounce,pascal,pint_uk,pint_us,pound,pound_foot,pound_force,quart,second,tesla,watt,watt_hour,yard,year

sys.util.fromstring
transforms a string matrix to the result matrix (with a fixed type)
Input Matrices (Min: 1 Max: 1):
stringmatrix TEXT the matrix containing strings
Output Matrices (Min: 1 Max: 1):
typedmatrix ANY the converted matrix (decides the type)

sys.util.hbreak
breaks the matrix in smaller matrices horizontally. It produces matrices made with the columns of the original one.
Input Matrices (Min: 2 Max: 3):
toBreak ANY the matrix to break
startX NUMERIC the array of columns where the small matrices start
width NUMERIC the array of sizes of the small matrices. If not given an array of 1 is assumed.
Output Matrices (Min: 1 Max: 64):
result ANY the matrix resulted from the breaking

sys.util.hglue
merges two or more matrices with the same horizontal size in one big matrix. The columns of the input matrices become the columns of the final matrix.
Input Matrices (Min: 1 Max: 64):
toglue ANY matrix to glue
Output Matrices (Min: 1 Max: 1):
glued ANY the final matrix

sys.util.lookup
finds the matrix 'what' items in the matrix 'where', and returns two position matrices, x and y
Input Matrices (Min: 2 Max: 2):
where ANY matrix where to find the items
what ANY matrix containing the items to find
Output Matrices (Min: 2 Max: 2):
x NUMERIC the x cohordinates of the positions
y NUMERIC the y cohordinates of the positions

sys.util.queue
Input Matrices (Min: 1 Max: 1):
toAdd ANY the matrix to attach to the end of the "queue" matrix
Output Matrices (Min: 1 Max: 1):
queue ANY the matrix that is expanded with the matrix "toAdd"
Parameters:
side TEXT the side of the "queue" matrix to attach the "toAdd" matrix to
Choices: BOTTOM,RIGHT,TOP,LEFT

sys.util.size
Returns the size of a set of matrices as an sizeX vector and an sizeY vector
Input Matrices (Min: 1 Max: 64):
in ANY the matrix to get the size of
Output Matrices (Min: 2 Max: 2):
sizeX NUMERIC the x size of each matrix as a vector
sizeY NUMERIC the x size of each matrix as a vector

sys.util.sort
sorts all the input matrices by the first column of the first matrix
Input Matrices (Min: 1 Max: 64):
matrixKey ANY The matrix whose first column is used as key to sort all the input matrices.
matrixValue ANY matrix that is sorted by the first column of matrixKey
Output Matrices (Min: 1 Max: 64):
sortedKey ANY the key matrix sorted
sortedValue ANY the matrix resulted by the sort of the matrix with the same index in the input

sys.util.tostring
converts a typed matrix into a string matrix
Input Matrices (Min: 1 Max: 1):
typedmatrix ANY the matrix to convert
Output Matrices (Min: 1 Max: 1):
stringmatrix TEXT the final matrix with all text elements

sys.util.transpose
transposes a matrix of any type
Input Matrices (Min: 1 Max: 1):
totranspose ANY the matrix to transpose
Output Matrices (Min: 1 Max: 1):
transposed ANY the input matrix transposed

sys.util.vbreak
breaks the matrix in smaller matrices vertically. It produces matrices made with the rows of the original one.
Input Matrices (Min: 2 Max: 3):
toBreak ANY the matrix to break
startY NUMERIC the array of the positions in which the small matrices start
height NUMERIC the array of the heights of the small matrices. If not given an array of 1 is assumed.
Output Matrices (Min: 1 Max: 64):
result ANY the result of the breaking

sys.util.vglue
merges together matrices with the same width to a big matrix. The rows of the input matrices become the rows of the final matrix.
Input Matrices (Min: 1 Max: 64):
toglue ANY the matrix to merge
Output Matrices (Min: 1 Max: 1):
glued ANY the merged matrix