How to show greek letters on a Simulink block with a mask?
45 次查看(过去 30 天)
显示 更早的评论
Hi, I am writing the name of a block in Simulink .I created a mask to display the name.the name of the block contains a greek character.I tried the same matlab method used in graphs to display the greek letter in the name of the block,but it didn't work out. is there anyway to show greek letters in the name of the block?
the line of code I used for the mask :
disp(sprintf('side-slip\nangle Observer {\beta}'))
Thanks in advance
0 个评论
采纳的回答
Monika Phadnis
2020-5-12
You can use ASCII code values of greek letters to display them as characters.
For example, try adding the following code in your mask's 'Icon drawing commands' section:
>> fprintf("%c", 945) %945 is the ASCII value for lowercase alpha
Another function that can be used to get the greek letter is 'char' followed with 'disp' function.
For example, try adding the following code in your mask's 'Icon drawing commands' section:
>> disp(char(946)) %946 is ASCII value for lowercase beta
Similarly, you can use ASCII values for different greek letters.
You can refer this link for getting the various ASCII values:
On this page, the number part of the 'Entity' column can be substituted in the ways described above for obtaining the greek letter.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 String 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!