Matrix.Rotate
-------------

Rotates a matrix.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Matrix](component_Matrix.md) | [12.4](newinversion124.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Matrix.Rotate"; MatrixRef ) 

**MBS**( **"Matrix.Rotate";** /\* Rotates a matrix. \*/  
**$MatrixRef**) /\* The matrix reference number.e.g. $matrix \*/ 

### 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](MatrixRelease.md) function.  
### Examples

Try the function:

 # test Matrix.Rotate in file Kontakte   
  
Set Variable \[ $matrix ; Value: MBS ("[Matrix.New](MatrixNew.md)";3;3) \]   
\# set values   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetColumn](MatrixSetColumn.md)"; $matrix ; 0;"15¶07¶92" ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetColumn](MatrixSetColumn.md)"; $matrix ; 1;"17¶3¶60" ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.SetColumn](MatrixSetColumn.md)"; $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](MatrixText.md)"; $matrix ) \]   
Set Variable \[ $text2 ; Value: MBS ( "[Matrix.Text](MatrixText.md)"; $matrix2 ) \]   
Set Variable \[ $text3 ; Value: MBS ( "[Matrix.Text](MatrixText.md)"; $matrix3 ) \]   
Show Custom Dialog \[ "Result" ; $text1 &amp; "¶rotated:¶" &amp; $text2 &amp; "¶and back:¶" &amp; $text3 \]   
\#   
Set Variable \[ $r ; Value: MBS ( "[Matrix.Release](MatrixRelease.md)"; $matrix ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.Release](MatrixRelease.md)"; $matrix2 ) \]   
Set Variable \[ $r ; Value: MBS ( "[Matrix.Release](MatrixRelease.md)"; $matrix3 ) \]  
### See also

- [Matrix.New](MatrixNew.md)
- [Matrix.Release](MatrixRelease.md)
- [Matrix.SetColumn](MatrixSetColumn.md)
- [Matrix.Text](MatrixText.md)

### Release notes

- **Version 12.4**
    - Added [Matrix.Rotate](https://www.mbsplugins.eu/MatrixRotate.shtml) function.

### Blog Entries

- [Top 10 from the MBS Plugin in 2022](https://www.mbsplugins.de/archive/2022-12-29/Top_10_from_the_MBS_Plugin_in_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 12.4](https://www.mbsplugins.de/archive/2022-09-27/MBS_FileMaker_Plugin_124/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 12.4 für Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/Neues_MBS_Plugin_124_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 12.4 for Claris FileMaker](https://www.mbsplugins.de/archive/2022-09-06/MBS_Plugin_124_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.4pr1](https://www.mbsplugins.de/archive/2022-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[Matrix.Resize](MatrixResize.md) - [Matrix.SearchAndReplace](MatrixSearchAndReplace.md)

[HTML Version](MatrixRotate.shtml)