Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Calculates sum value in a matrix column.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Matrix | 9.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
MatrixRef | The matrix reference number. | $matrix | |
Column | The index of the column. Default is 0. |
0 | |
firstRow | The index of first row. Default is 0. |
0 | Optional |
lastRow | The index of last row. Default is Matrix.Height-1. |
5 | Optional |
Returns number or error.
Sums the values in a matrix:
Set Variable [ $matrix; Value: MBS("Matrix.New";3;3) ]
# Set the values of the matrix
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 0;"15¶07¶92" ) ]
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 1;"17¶3¶60" ) ]
Set Variable [ $r; Value: MBS( "Matrix.SetColumn"; $matrix; 2;"15¶1¶87" ) ]
# Add all numbers in the matrix (3x3)
Set Variable [ $a; Value: MBS( "Matrix.Sum"; $matrix; 0 ) ]
Set Variable [ $b; Value: MBS( "Matrix.Sum"; $matrix; 1 ) ]
Set Variable [ $c; Value: MBS( "Matrix.Sum"; $matrix; 2 ) ]
Set Variable [ $sum; Value: $a+$b+$c ]
Set Variable [ $r; Value: MBS("Matrix.Release"; $matrix) ]
This function checks for a license.
Created 8th April 2019, last changed 7th April 2022