MATLAB: How to write superscripts in axis labels

superscript in labels

when I wrote the following plot. I couldn't get the superscript in labels.Can you guys help me. Thank you.
d = [ 2 4 5 7] d5l =1*[0.8839 2.45 13.59 5.492] plot(d,d5l,'–kd','markersize',20,'markerfacecolor','k') str1=' bell diameter $$d $$[cm]' str2='$$|\overline{Q}|$$ [cm^2/s]' legend('x/d = -1') xlabel(str1,'interpreter','latex','fontsize',30,'fontweight','bold') ylabel(str2,'interpreter','latex','fontsize',30,'fontweight','bold') set(gca, 'FontSize', 35,'fontweight','bold'); box on

Best Answer

To get a subscript you must use the underscore "_" character and for superscript use "^". For example:
plot(1:10)
title('^{super} normal _{sub}')