| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Matrix.Multiply
Multiplies a value with cells in matrix.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Matrix | 10.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "Matrix.Multiply"; MatrixRef; Value { ; FirstRow; LastRow; firstCol; lastCol } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| MatrixRef | The matrix reference number. | $matrix | |
| Value | The value to use for multiplication to all cells. | 1.2 | |
| FirstRow | The index of first row. Default is 0. |
0 | Optional |
| LastRow | The index of last row. Default is Matrix.Height-1. |
5 | Optional |
| firstCol | The index of first column. Default is 0. |
0 | Optional |
| lastCol | The index of last column. Default is Matrix.Width-1. |
6 | Optional |
Result
Returns OK or error.
Description
Multiplies a value with cells in matrix.We loop over all rows in all columns for the range and add the given value to the numbers.
If the cell doesn't contain a number, it's converted to a number like GetAsNumber().
Examples
Add 19% tax to a column of prices:
# prices in column 1 of the matrix
Set Variable [ $matrix ; Value: MBS( "Matrix.NewWithSQL"; ""; "SELECT Name, Price FROM Products" ) ]
Set Variable [ $last ; Value: MBS( "Matrix.Height"; $matrix ) - 1 ]
# multiply all rows of column 1 with 1.19
Set Variable [ $r ; Value: MBS( "Matrix.Multiply"; $matrix; 1.19; 0; $last; 1; 1 ) ]
Set Variable [ $r ; Value: MBS( "Matrix.Release"; $matrix ) ]
Set Variable [ $matrix ; Value: MBS( "Matrix.NewWithSQL"; ""; "SELECT Name, Price FROM Products" ) ]
Set Variable [ $last ; Value: MBS( "Matrix.Height"; $matrix ) - 1 ]
# multiply all rows of column 1 with 1.19
Set Variable [ $r ; Value: MBS( "Matrix.Multiply"; $matrix; 1.19; 0; $last; 1; 1 ) ]
Set Variable [ $r ; Value: MBS( "Matrix.Release"; $matrix ) ]
See also
Release notes
- Version 16.6
- Improved Matrix.Avg, Matrix.CSV, Matrix.JSONRecords, Matrix.Max, Matrix.Min, Matrix.Multiply, Matrix.Sum and Matrix.Text to not report an error for empty result sets.
- Version 12.5
- Fixed a bug in Matrix.Add and Matrix.Multiply.
- Version 10.3
- Added Matrix.Multiply function.
Blog Entries
- MBS FileMaker Plugin, version 12.5pr3
- CSV in FileMaker with MBS FileMaker Plugin
- What is new in the MBS FileMaker Plugin Version 10.3
- Neues MBS FileMaker Plugin 10.3 - Über 6200 Funktionen in einem Plugin
- MBS FileMaker Plugin 10.3 - More than 6200 Functions In One Plugin
- MBS FileMaker Plugin, version 10.3pr1
This function checks for a license.
Created 28th May 2020, last changed 6th November 2026
MarkDown version: MatrixMultiply.md