Plot title sprintf format pi
Mostra commenti meno recenti
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);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Labels and Annotations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!