Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Greek letter in Matlab plot

I have created a plot in Matlab and now I would like to add a legend with the following command:

legend({'Pos1', 'Pos2', 'Pos3', '\alpha Pos4'}, 'Location', 'northeast', 'Interpreter', 'latex', 'fontsize', 22);
legend('boxoff')

The problem is that \alpha is not transformed into the greek letter. If I ommit the curly brackets {} then it works but I need them because I only want to label the first four lines.

How can I get the greek letter alpha?

like image 920
Erdinger Avatar asked Mar 17 '16 01:03

Erdinger


1 Answers

You forgot the $

legend({'Pos1', 'Pos2', 'Pos3', '$\alpha$ Pos4'}, 'Location', 'northeast', 'Interpreter', 'latex', 'fontsize', 22);
like image 139
Daniel Avatar answered Sep 21 '22 11:09

Daniel