MATLAB Answers

0

Legend label - differential dot above letter with a subscript

Asked by Carly Beck on 29 Jul 2019
Latest activity Commented on by infinity
on 29 Jul 2019
I'm trying to have one of my legend labels be "X_Piston" where X has the differential dot above it and 'Piston' is in Subscript format. I can get the differential dot but cannot seem to get the subscript. Any help is appreciated, thank you!!
name = legend('$\dot{X}$');
set(name,'Interpreter','latex');

  0 Comments

Sign in to comment.

1 Answer

Answer by infinity
on 29 Jul 2019
 Accepted Answer

Hello,
How about this
name = legend('$\dot{X}_{Piston}$');
set(name,'Interpreter','latex');

  6 Comments

Yes. You can do like this
name = legend('$\dot{X}_{Piston}$', '$X_{Piston}$');
set(name,'Interpreter','latex');
You are welcome!

Sign in to comment.