Investment Studio > Expressions > Functions > Matrix > MSUM
float array[m][n] msum(float array[m][n] a, float array[m][n] b)
Returns the matrix sum of float arrays a and b. The arrays must have the same dimensions.
Non-numeric array elements are automatically converted to numbers. If conversion fails, they are treated as zeros.
Equivalent to addition operator (+) with array operands.
The result is an array with the same dimensions as the argument arrays.
Example
=msum({{1, 2}, {3, 4}, {5, 6}}, {{7, 8}, {9, 10}, {11, 12}})
equals {{8, 10}, {12, 14}, {16, 18}}
=msum({{1, 2}, {3, 4}, {5, 6}}, {{"7", "8"}, {"9", "10"}, {"", ""}})
equals {{8, 10}, {12, 14}, {5, 6}}.