# Showing average of a value using Bar sign in Matlab

I want to use bar sign (a line above a variable) to show the average of a variable. I found this code:

plot(randn(100,1)); ylabel('$\bar{ABCDEFG}-T5$','interpreter','latex')

but this line is small. Is there a way to make it same as length of the variable?

## Answers

How about:

ylabel('$\overline{ABCDEFG}-T5$', 'interpreter','latex')

I found out for using it in legend we should say

legend({'$\overline{ABCDEFG}-T5$'},'interpreter','latex');