Plot title sprintf format pi
Ältere Kommentare anzeigen
How can I display on a plot's Title the input value pi with Greek character "π" or in English "pi". For example: prompt = 'What is the original value? '; x = input(prompt) I insert the value pi/2 So i want the plot title to be like: Output=π/2 I used the following code but it keeps giving me the value 0.707 instead of the π/2 or pi/2 i want.
str = sprintf('Output x=%d',x);
title(str);
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Labels and Annotations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!