Matrix.Multiply
---------------

Multiplies a value with cells in matrix.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [10.3](newinversion103.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.Multiply"; MatrixRef; Value { ; FirstRow; LastRow; firstCol; lastCol } ) 

**MBS**( **"Matrix.Multiply";** /\* Multiplies a value with cells in matrix. \*/  
**$MatrixRef**; /\* The matrix reference number.e.g. $matrix \*/   
**$Value**; /\* The value to use for multiplication to all cells.e.g. 1.2 \*/   
**$FirstRow**; /\* Optional; The index of first row.  
Default is 0.e.g. 0 \*/   
**$LastRow**; /\* Optional; The index of last row.  
Default is [Matrix.Height](MatrixHeight.md)-1.e.g. 5 \*/   
**$firstCol**; /\* Optional; The index of first column.  
Default is 0.e.g. 0 \*/   
**$lastCol**) /\* Optional; The index of last column.  
Default is [Matrix.Width](MatrixWidth.md)-1.e.g. 6 \*/ 

### 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](MatrixHeight.md)-1. | 5 | Optional |
| firstCol | The index of first column.   Default is 0. | 0 | Optional |
| lastCol | The index of last column.   Default is [Matrix.Width](MatrixWidth.md)-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().  
### See also

- [Math.Multiply](MathMultiply.md)
- [Matrix.Height](MatrixHeight.md)
- [Matrix.Width](MatrixWidth.md)

### Release notes

- **Version 12.5**
    - Fixed a bug in [Matrix.Add](https://www.mbsplugins.eu/MatrixAdd.shtml) and [Matrix.Multiply](https://www.mbsplugins.eu/MatrixMultiply.shtml).
- **Version 10.3**
    - Added [Matrix.Multiply](https://www.mbsplugins.eu/MatrixMultiply.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 12.5pr3](https://www.mbsplugins.de/archive/2022-10-14/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [CSV in FileMaker with MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2022-10-11/CSV_in_FileMaker_with_MBS_File/monkeybreadsoftware_blog_filemaker)
- [What is new in the MBS FileMaker Plugin Version 10.3](https://www.mbsplugins.de/archive/2020-07-31/What_is_new_in_the_MBS_FileMak/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 10.3 - Über 6200 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2020-07-21/Neues_MBS_FileMaker_Plugin_103/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.3 - More than 6200 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-07-21/MBS_FileMaker_Plugin_103_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.3pr1](https://www.mbsplugins.de/archive/2020-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 28th May 2020 , last changed 7th April 2022

  
[Matrix.Min](MatrixMin.md) - [Matrix.New](MatrixNew.md)

[HTML Version](MatrixMultiply.shtml)