Data Processing with ODMath¶
Basic Arithmetic¶
For example, define two matrices A and B.
If we used the expression string ‘2 * A + B’ we would get the following.
You can also use brackets to change the order of operations.
Division can also be performed using ‘B / A’.
Multiplication ‘A * B’ would result in:
Powers ‘A ^ B’ would result in:
Vectors¶
Vectors can also be used in arithmetic. In the following we define C as a Vertical matrix, and D is a Horizontal matrix. If a matrix is loaded from a data source it will not have a directionality and must be given one before being used with matrices.
The following is the difference between the basic arithmetic with vertical and horizontal vectors applied to A:
Functions¶
There are a number of built-in functions to help facilitate more complicated calculations. A function call is structured as ‘functionName(parameter1,parameter2,…,parameter)’. In the table below we can see a quick reference of all of the functions, their input types, and output times.
Function Name | Parameter Type | Output Type |
---|---|---|
Tranpose | Matrix | Matrix |
Tranpose | Vector | Vector |
SumRows | Vector | Vector (Vertical) |
SumColumns | Matrix | Vector (Horizontal) |
AsHorizontal | Vector | Vector (Horizontal) |
AsVertical | Vector | Vector (Vertical) |