Discussion:
Using Latex in GUI (subscript)
(too old to reply)
Roberto
2010-09-21 12:16:05 UTC
Permalink
Good afternoon,

I have created a GUI in Matlab. I created some static text, and I inserted their names in the field 'String', in 'Property inspector'.

But I would like to use subscripts in their names, and I have heard something about using Latex, but I don't know how to enable and how to use it.

For example, if I want to write in 'String', the sampling frequency:
String: fs (but writing s like a subscript), how I can to do that??

Thank you very much.
Steven_Lord
2010-09-21 13:35:30 UTC
Permalink
Post by Roberto
Good afternoon,
I have created a GUI in Matlab. I created some static text, and I inserted
their names in the field 'String', in 'Property inspector'.
But I would like to use subscripts in their names, and I have heard
something about using Latex, but I don't know how to enable and how to use
it.
String: fs (but writing s like a subscript), how I can to do that??
You can't do this directly in a UICONTROL like a static text box; you can do
it in a TEXT object on a graph, though, by using the _ and ^ characters, as
described in the documentation.

http://www.mathworks.com/help/techdoc/creating_plots/f0-4741.html#f0-28104
--
Steve Lord
***@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Roberto
2010-09-21 15:20:20 UTC
Permalink
Post by Steven_Lord
Post by Roberto
Good afternoon,
I have created a GUI in Matlab. I created some static text, and I inserted
their names in the field 'String', in 'Property inspector'.
But I would like to use subscripts in their names, and I have heard
something about using Latex, but I don't know how to enable and how to use
it.
String: fs (but writing s like a subscript), how I can to do that??
You can't do this directly in a UICONTROL like a static text box; you can do
it in a TEXT object on a graph, though, by using the _ and ^ characters, as
described in the documentation.
http://www.mathworks.com/help/techdoc/creating_plots/f0-4741.html#f0-28104
--
Steve Lord
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Thank you,
but then, I cannot either write pi or other symbols in a GUI? Because I need use Latex too.

I cannot create a graph to write a text with it, because I only need text and values.
Yair Altman
2010-09-21 18:35:20 UTC
Permalink
Post by Roberto
but then, I cannot either write pi or other symbols in a GUI? Because I need use Latex too.
I cannot create a graph to write a text with it, because I only need text and values.
Here is another solution, that support [almost] the complete HTML set, including superscripts, subscripts and special symbols like pi:

http://UndocumentedMatlab.com/blog/customizing-matlab-labels/

Yair Altman
http://UndocumentedMatlab.com

Loading...