How do I rotate a text written inside a block mask?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 24 Apr. 2020
Beantwortet: MathWorks Support Team
am 24 Apr. 2020
I am generating a block mask and I would like the texts to be placed according to the block orientation (rotation). Can I rotate a text written inside the mask using the "text" function or using another function?
Akzeptierte Antwort
MathWorks Support Team
am 24 Apr. 2020
To flip a text inside a mask, you can display a text using the 'disp' command and flip it with the 'fliplr' function.
Alternatively, if you would like to rotate the text, you can set the "Icon rotation" option to "Rotates" in the Mask Editor and then the text is rotated by 90 degrees when the block is rotated. At the same time, when using the function 'text' to display a text, the location of the string will be flipped when the block is flipped.
However, these workarounds do not allow to rotate the text upside down. In MATLAB, it is possible to rotate a text specifying the degrees using the function 'text' and the property 'Rotation', but this functionality is not available inside a mask.
You can find an example attached on how to detect if the orientation has changed and display a text in a mask. You can try rotating and flipping the block to see how the texts are moved and rotated.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!