How to make an subscript in this specific manner?

I am trying to print a axis label using the following code to make it italicized
ylabel('$u_max$','interpreter','latex','FontSize',14);
I wanr the "max" to all be a subscript to "u" but as of right now only the "m" is a subscript and the rest of the word is normal alongside the "u". How would I make the whole "max" a subscript in the way I have coded it?

Answers (1)

Put the max in braces:
ylabel('$u_{max}$','interpreter','latex','FontSize',14);

Tags

Asked:

on 12 Feb 2025

Answered:

on 13 Feb 2025

Community Treasure Hunt

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

Start Hunting!