Format text into TeX string
TeXString = texlabel(f) converts the MATLAB® expression f into the TeX equivalent for use in text strings. texlabel converts Greek variable names (for example, lambda, delta, and so on) into a string that is displayed as Greek letters. The TeXString output is useful as an argument to annotation functions such as title, xlabel, and text.
If TeXString is too long to fit into a figure window, then the center of the expression is replaced with a tilde ellipsis (~~~).
Create a figure and a TeX string for use in a text graphics object.
figure plot((1:10).^2) TeXString = texlabel('lambda12^(3/2)/pi - pi*delta^(2/3)');
Add a text object containing the TeX string to the figure.
If you include the 'literal' argument, texlabel interprets Greek variable names literally. Add a text object containing the literal string.
text(4,60,texlabel('lambda12^(3/2)/pi - pi*delta^(2/3)','literal'))