MATLAB: How to add a superscript to a uicontrol

superscriptuicontrol

Can anyone explain me why this dont work (superscript)?
r10 = uicontrol(bg,'Style','radiobutton',...
'String',sprintf('New %g^{n}',2),...
'Position',[0 0 100 30],...
thanks

Best Answer

sprintf('<HTML>New %g<SUP>n</SUP>',2)
Uicontrol have never supported tex or latex. Some uicontrol support HTML.