Modify axis label for each plot within loop

2 vues (au cours des 30 derniers jours)
L'O.G.
L'O.G. le 6 Déc 2022
Réponse apportée : Voss le 6 Déc 2022
I am generating plots for a series of values using a for loop and wish to output the value in the axis label. How do I do that?
ylabel('z = [insert value here]')

Réponse acceptée

Voss
Voss le 6 Déc 2022
z = 2.1;
ylabel(sprintf('z = %.2f',z))
See: sprintf

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by