Printing special characters in an axis label

How do you print special character(s) using sprintf? I want to use this or similar to add special characters to an axis label as in the following:
Here the degree sign doesn't print:
ylabel(sprintf('T at %.0f \circF',Temp))

 Respuesta aceptada

Temp = -19.6
Temp = -19.6000
ylabel(sprintf('T at %.0f \\circF',Temp), 'Interpreter', 'tex')

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Etiquetas

Preguntada:

el 6 de Dic. de 2022

Respondida:

el 6 de Dic. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by