Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

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

Blog Entries

This function checks for a license.

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


Matrix.Resize - Matrix.SetColumn