how can I write greek letters in static text?

how can I write greek letters in static text? because writing \alpha in the static text when I run the GUI appears written "\alpha"...

 採用された回答

Friedrich
Friedrich 2014 年 5 月 20 日

0 投票

Hi,
see here.

4 件のコメント

Jacopo
Jacopo 2014 年 5 月 23 日
Hello. I expose my question. I have tried to insert Greek letters in a static text following the procedure at the link:
I put in the Property Inspector in the entry "Tag" latex_text5 and under "String" \ alpha. However, in the command window I get the following warning:
Warning: Unable to interpret LaTeX string "\ alpha" > In openfig at 135 In gui_mainfcn> local_openfig at 286 In gui_mainfcn at 234 In GUI_prova2 at 42
What should I do to see the Greek letter alpha in the static text?
I tried it now. Writing "\ alpha" instead of "\alpha" appears only in the static text the word "alpha" but not the Greek letter alpha.
Friedrich
Friedrich 2014 年 5 月 23 日
編集済み: Friedrich 2014 年 5 月 23 日
did you also set a invivisble axes to the background and did you apply the text command? also did you remove the static text box afterwards?
Jacopo
Jacopo 2014 年 5 月 23 日
no. I copied the full piece of code in the link, specifically:
handles.laxis = axes ('Parent', hObject, 'units', 'normalized', 'position', [0 0 1 1], 'visible', 'off');
lbls = findobj (hObject, '-regexp', 'tag', 'latex_ *');
for i = 1: length (lbls)        l = lbls (i);        % Get current text, position and tag        set (l, 'units', 'normalized');        s = get (l, 'string');        p = get (l, 'position');        t = get (l, 'tag');        % Remove the Uicontrol        delete (l);        % Replace it with a TEXT object        handles. (t) = text (p (1), p (2), s, 'interpreter', 'latex'); end
If I have to write something different, you can write exactly what I have to write in code?
Friedrich
Friedrich 2014 年 5 月 27 日
I think you missed the last sentence
"Further in GUIDE give the Static Text boxes which need to be rendered using LaTeX, a 'Tag' which starts with latex_."

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLabels and Annotations についてさらに検索

タグ

質問済み:

2014 年 5 月 20 日

コメント済み:

2014 年 5 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by