How to show greek letters on a Simulink block with a mask?

40 ビュー (過去 30 日間)
Mohamed Abdullah
Mohamed Abdullah 2020 年 5 月 9 日
回答済み: Monika Phadnis 2020 年 5 月 12 日
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

採用された回答

Monika Phadnis
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 件)

カテゴリ

Help Center および File ExchangeString についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by