Use Latex in Matlab legend?

latex, legend, matlab

Solution

Try with Latex interpreter, something like

legend({'$b^{+6}\rightarrow b^{+7}$'}, 'interpreter', 'latex')

Tested under R2012a:

Problem

My matlab does not accept my latex . For example if I use `legend('b^{+6}\rightarrow b^{+7}')`, it does not show me the arrow, How I can solve the problem?

Original source