%% Include Special Characters in Axis Labels
% This example shows how to add axis labels with superscripts and Greek symbols. To display superscripts and subscripts, use the characters "^" and "_", respectively. To display Greek symbols, use the TeX markup. MATLAB® interprets characters immediately following the backslash, "\", as TeX characters.
% Create a plot and label the x-axis and y-axis. Use the TeX markup, \pi, to display the Greek symbol \pi.

figure
x = linspace(0,2*pi);
y = exp(0.1*x).*sin(x.^2);
plot(x,y)

xlabel('x = 0 to 2\pi')
ylabel('y = e^{0.1x} sin(x^2)')

% The superscript character, "^", modifies the character immediately following it. Display multiple characters in the superscript by including them in curly braces.
% Copyright 2015 The MathWorks, Inc.