-1

I am wondering how to implement text in a legend with both a superscript and a subscript, and with an horizontal bar, something like this: Image

1 Answers1

0

Whenever you want to use some $\LaTeX$-style text in MATLAB, you have to specifiy the corresponding Interpreter option to use LaTeX. For a legend with your provided example this works with

legend("$\bar{H}^{front}_{debris}$",'Interpreter','latex')
Leo
  • 168