How to input a text variable in a plot title?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ilias Tripodis
le 13 Juil 2018
Modifié(e) : Ilias Tripodis
le 13 Juil 2018
Hello, I have 100 plots to do but I have to change the title and the labels every time. Is it possible to input a value with the name of the title and the labels in order to be set in all plots without doing it by my own? Thank you in advance for your response!
0 commentaires
Réponse acceptée
Fangjun Jiang
le 13 Juil 2018
Is this what you want?
title('plot title')
TitleText='second plot';
title(TitleText)
3 commentaires
Fangjun Jiang
le 13 Juil 2018
use sprintf(), use %d for numerical data, use %s for string
title(sprintf('%s vs Time',x))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Title dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!