matrixMultiply

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Arma 3 version 1.92
  

Click on the images for descriptions

Introduced in

Game:
Arma 3
Version:
1.92

Description

Description:
Resulting matrix of matrix multiplication.
First matrix must be of size N✕K, while the second must be of size K✕M.
If the shapes do not match, [] will be it returned.

Syntax

Syntax:
matrix1 matrixMultiply matrix2
Parameters:
matrix1: Array
matrix2: Array
Return Value:
Array

Examples

Example 1:
[[2],[2]] matrixMultiply [ [3] ]//Returns [[6],[6]]
Example 2:
[[-1,0,0], [0,-1,0], [0,0,-1]] matrixMultiply [[1,2,3], [3,1,2], [2,3,1]] //Returns [[-1,-2,-3], [-3,-1,-2], [-2,-3,-1]]

Additional Information

Multiplayer:
-
See also:
See also needed

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To
Posted on 30 Jun, 2019
oOKexOo
Note that this command won't transform a 1D array automatically into a column vector [[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [1,2,3] // wrong, syntax error [[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [[1,2,3]] // wrong, will return [] [[-1,0,0],[0,-1,0],[0,0,-1]] matrixMultiply [[1], [2], [3]] // correct, will return [[-1], [-2], [-3]]

Bottom Section