matrixMultiply: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Lou Montana (talk | contribs) m (Text replacement - "<code> +" to "<code>") |
||
Line 62: | Line 62: | ||
<dt class="note">[[User:oOKexOo| oOKexOo]]<dd class="note"> | <dt class="note">[[User:oOKexOo| oOKexOo]]<dd class="note"> | ||
Note that this command won't transform a 1D array automatically into a column vector | Note that this command won't transform a 1D array automatically into a column vector | ||
<code> | <code>[[-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, 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]] // wrong, will return [] | ||
[[-1,0,0],[0,-1,0],[0,0,-1]] [[matrixMultiply]] [[1], [2], [3]] // correct, will return [[-1], [-2], [-3]] | [[-1,0,0],[0,-1,0],[0,0,-1]] [[matrixMultiply]] [[1], [2], [3]] // correct, will return [[-1], [-2], [-3]] |
Revision as of 16:52, 7 February 2021
Description
- Description:
- Description needed
- Groups:
- MathMath - Vectors
Syntax
- Syntax:
- Syntax needed
- Parameters:
- matrix1: Array - matrix of the size n(rows) ✕ k(columns)
- matrix2: Array - matrix of the size k(rows) ✕ m(columns)
- Return Value:
- Return value needed
Examples
- Example 1:
[ [2], [2] ] matrixMultiply [ [3] ] /* returns [ [6], [6] ] */
- Example 2:
[ [-1,0,0], [0,-1,0] ] matrixMultiply [ [1,2], [3,1], [2,3] ] /* returns [ [-1,-2], [-3,-1] ] */
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- 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]]