Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4    Statistic    FMM    Blog  

Matrix.Rotate

Rotates a matrix.

Component Version macOS Windows Linux Server iOS SDK
Matrix 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Matrix.Rotate"; MatrixRef )   More

Parameters

Parameter Description Example
MatrixRef The matrix reference number. $matrix

Result

Returns matrix reference number or error.

Description

Rotates a matrix.
X and Y get rotated for all values.
Column names and Row Names also get swapped.
New Matrix is returned and please free later with Matrix.Release function.

Examples

Try the function:

# test Matrix.Rotate in file Kontakte

Set Variable [ $matrix ; Value: MBS("Matrix.New";3;3) ]
# set values
Set Variable [ $r ; Value: MBS( "Matrix.SetColumn"; $matrix; 0;"15¶07¶92" ) ]
Set Variable [ $r ; Value: MBS( "Matrix.SetColumn"; $matrix; 1;"17¶3¶60" ) ]
Set Variable [ $r ; Value: MBS( "Matrix.SetColumn"; $matrix; 2;"15¶1¶87" ) ]
# rotate
Set Variable [ $matrix2 ; Value: MBS( "Matrix.Rotate"; $matrix) ]
Set Variable [ $matrix3 ; Value: MBS( "Matrix.Rotate"; $matrix2) ]
# query
Set Variable [ $text1 ; Value: MBS( "Matrix.Text"; $matrix) ]
Set Variable [ $text2 ; Value: MBS( "Matrix.Text"; $matrix2) ]
Set Variable [ $text3 ; Value: MBS( "Matrix.Text"; $matrix3) ]
Show Custom Dialog [ "Result" ; $text1 & "¶rotated:¶" & $text2 & "¶and back:¶" & $text3 ]
#
Set Variable [ $r ; Value: MBS( "Matrix.Release"; $matrix) ]
Set Variable [ $r ; Value: MBS( "Matrix.Release"; $matrix2) ]
Set Variable [ $r ; Value: MBS( "Matrix.Release"; $matrix3) ]

See also

Release notes

  • Version 12.4
    • Added Matrix.Rotate function.

Created 21st July 2022, last changed 21st July 2022


Matrix.Resize - Matrix.SetColumn

Feedback: Report problem or ask question.


Start Chat