How to display a text on a uifigure using an interpreter

21 次查看(过去 30 天)
Hello,
Recently I was trying to display a text like this on a uifigure
text(0.5,0.5,"Hello_{world}")
axis off
However uitextarea doesn't support any interpreter so it just end up showing Hello_{world}
Any suggestion ?
  1 个评论
Matteo Bonhomme
Matteo Bonhomme 2023-1-9
(I made this question after I found a solution because I couldn't find it anywhere. I hope that it helps someone)

请先登录,再进行评论。

采纳的回答

Matteo Bonhomme
Matteo Bonhomme 2023-1-9
I found a workaround creating a plot and adding a text to the plot then hiding the axes
hFig=uifigure;
ax=uiaxes(hFig);
text(ax,0.5,0.5,"Hello_{world}",'FontSize', 40)
ax.Visible='off';

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息

标签

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by