How to write equations in gui edit text box?

2 ビュー (過去 30 日間)
Tom
Tom 2014 年 6 月 6 日
回答済み: per isakson 2014 年 6 月 7 日
Hello
Can anyone tell me how to write an equation with superscript, symbols etc. to a gui edit text box.
Writing something like this doesn't work:
set(handles.box1,'String','y=1+x^2')
I know that there is a function called uibutton which can handle this type of issue for a button. Has anyone written something that works for edit text boxes?
Thanks in advance.
-Tom
  2 件のコメント
David Sanchez
David Sanchez 2014 年 6 月 6 日
Could you paste the error you get. I do right that what you say you can not do with no problems at all.
Tom
Tom 2014 年 6 月 6 日
I don't get an error but x^2 is displayed as x^2 and not as x superscript 2.

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

採用された回答

per isakson
per isakson 2014 年 6 月 7 日
The short answer is: It cannot be done! That's why Douglas Schwarz created uibutton: GUI pushbuttons with better labels, which I guess is the function you refer to.
Undocumented Matlab present another approach: Rich Matlab editbox contents.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by