Modify axis label for each plot within loop

5 visualizaciones (últimos 30 días)
L'O.G.
L'O.G. el 6 de Dic. de 2022
Respondida: Voss el 6 de Dic. de 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]')

Respuesta aceptada

Voss
Voss el 6 de Dic. de 2022
z = 2.1;
ylabel(sprintf('z = %.2f',z))
See: sprintf

Más respuestas (0)

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by