matrixTranspose: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.92 | |1.92 | ||
|arg= |Multiplayer Arguments =("local" or "global") | |arg= |Multiplayer Arguments =("local" or "global") | ||
|eff | |eff= | ||
|serverExec | |serverExec= | ||
|gr1= Math | |gr1= Math | ||
|gr2= Math - Vectors | |gr2= Math - Vectors | ||
| Returns [https://en.wikipedia.org/wiki/Transpose transposed] version of the given matrix. The matrix is an [[Array]] of rows. Each row is an [[Array]] of corresponding column values for the row. The minimum number of rows is 1. | | Returns [https://en.wikipedia.org/wiki/Transpose transposed] version of the given matrix. The matrix is an [[Array]] of rows. Each row is an [[Array]] of corresponding column values for the row. The minimum number of rows is 1. | ||
<br><br> | <br><br> | ||
[[Image:matrixTranspose.jpg|500px]] | [[Image:matrixTranspose.jpg|500px]] | ||
<br><br> | <br><br> | ||
| [[matrixTranspose]] matrix | | [[matrixTranspose]] matrix | ||
|p1=matrix: [[Array]] - given matrix |param1= | |p1=matrix: [[Array]] - given matrix |param1= | ||
| [[Array]] - transposed matrix | | [[Array]] - transposed matrix | ||
|x1= <code>[[matrixTranspose]] | |x1= <code>[[matrixTranspose]] | ||
Line 36: | Line 36: | ||
[2,1,3], | [2,1,3], | ||
[3,2,1] | [3,2,1] | ||
] */</code> | ] */</code> | ||
|x2= <code>[[matrixTranspose]] | |x2= <code>[[matrixTranspose]] | ||
[ | [ | ||
Line 46: | Line 46: | ||
[2], | [2], | ||
[3] | [3] | ||
] */</code> | ] */</code> | ||
|x3= <code>[[matrixTranspose]] | |x3= <code>[[matrixTranspose]] | ||
[ | [ | ||
Line 56: | Line 56: | ||
[ | [ | ||
[1,2,3] | [1,2,3] | ||
] */</code> | ] */</code> | ||
| [[matrixMultiply]], [[vectorAdd]], [[vectorMagnitude]], [[vectorNormalized]], [[vectorMultiply]], [[vectorDotProduct]], [[vectorCrossProduct]], [[vectorDistance]], [[vectorLinearConversion]], [[vectorCos]], [[vectorFromTo]], [[vectorModelToWorld]], [[vectorWorldToModel]] | | [[matrixMultiply]], [[vectorAdd]], [[vectorMagnitude]], [[vectorNormalized]], [[vectorMultiply]], [[vectorDotProduct]], [[vectorCrossProduct]], [[vectorDistance]], [[vectorLinearConversion]], [[vectorCos]], [[vectorFromTo]], [[vectorModelToWorld]], [[vectorWorldToModel]] | ||
}} | }} | ||
Revision as of 01:06, 18 January 2021
Description
- Description:
- Returns transposed version of the given matrix. The matrix is an Array of rows. Each row is an Array of corresponding column values for the row. The minimum number of rows is 1.
- Groups:
- MathMath - Vectors
Syntax
- Syntax:
- matrixTranspose matrix
- Parameters:
- matrix: Array - given matrix
- Return Value:
- Array - transposed matrix
Examples
- Example 1:
matrixTranspose [ [1,2,3], [3,1,2], [2,3,1] ]; /* returns [ [1,3,2], [2,1,3], [3,2,1] ] */
- Example 2:
matrixTranspose [ [1,2,3] ]; /* returns [ [1], [2], [3] ] */
- Example 3:
matrixTranspose [ [1], [2], [3] ]; /* returns [ [1,2,3] ] */
Additional Information
- See also:
- matrixMultiplyvectorAddvectorMagnitudevectorNormalizedvectorMultiplyvectorDotProductvectorCrossProductvectorDistancevectorLinearConversionvectorCosvectorFromTovectorModelToWorldvectorWorldToModel
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