Modify axis label for each plot within loop

3 Ansichten (letzte 30 Tage)
L'O.G.
L'O.G. am 6 Dez. 2022
Beantwortet: Voss am 6 Dez. 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]')

Akzeptierte Antwort

Voss
Voss am 6 Dez. 2022
z = 2.1;
ylabel(sprintf('z = %.2f',z))
See: sprintf

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by