How do I put a hat on a character displayed in a text object within a figure in MATLAB?
137 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I would like to put a hat (^) on a character that is displayed in an X-Label, Y-Label, Z-Label, Title or other text object within a figure in MATLAB.
Respuesta aceptada
MathWorks Support Team
el 27 de Jun. de 2009
As of MATLAB 7.0 (R14), "LaTeX" has been added as an optional interpreter for text objects in a figure.
In order to put a hat on a character that is to be displayed within a figure, the "Interpreter" property of the text should to be set to "LaTeX" and the equivalent LaTeX command "\hat{x}" should be typed as "$$\hat{x}$$".
For example, to have "x-hat" displayed in the X-Label, do the following:
xlabel('$$\hat{x}$$','Interpreter','Latex')
Another example to have "x-hat" displayed as text is:
text(xp,yp,'$$\hat{x}$$','Interpreter','Latex')
where "xp" and "yp" determine the position of the displayed text.
There are no known workarounds for MATLAB 6.5.1 (R13SP1) or earlier versions.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Labels and Annotations en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!