plotting a figure with a variable as title
21 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
AA
le 25 Déc 2014
Réponse apportée : Star Strider
le 25 Déc 2014
Hi, i want to plot a graph and the title of that graph should be equal to the variable mx1. how can i implement that?
0 commentaires
Réponse acceptée
Image Analyst
le 25 Déc 2014
Try something like this
caption = sprintf('The result for this graph is %.3f', mx1);
title(caption, 'FontSize', 30);
0 commentaires
Plus de réponses (1)
Star Strider
le 25 Déc 2014
Use sprintf:
mx1 = pi;
figure(1)
scatter(rand(10,1), rand(10,1))
grid
ttl = sprintf('Scatterplot For mx_1 = %.5f', mx1)
title(ttl)
0 commentaires
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots 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!