Printing special characters in an axis label

6 views (last 30 days)
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))

Accepted Answer

Walter Roberson
Walter Roberson on 6 Dec 2022
Temp = -19.6
Temp = -19.6000
ylabel(sprintf('T at %.0f \\circF',Temp), 'Interpreter', 'tex')

More Answers (0)

Categories

Find more on Characters and Strings in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!