Modify axis label for each plot within loop

4 次查看(过去 30 天)
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]')

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by