# MATLAB: How to put hat over a greek symbol express its value in legend of a plot

greek letterslegendMATLABplotsymbols

I want to write expressions like alpha_0 cap(or hat)=0, alpha_0 cap(or hat)=1 and so on in legend of a plot.
Need to display aplha, with subsscript zero, with a hat, equate to a numerical value.
Kindly help me.

legend(sprintf('$\\hat{\\alpha}(0) = %d$',2),'Interpreter','latex')                                       %  ^----- numeric value