MATLAB: How to put a symbol (~) above a letter

diacriticdothatsymbol above letterstilde

I need to put ~ avobe a letter. Is this possible in matlab? I have tried some things but the symbol appears before and after the letter but not above.
[Moved from section for answers] I need to put it in many letters.

Best Answer

Where do you need to add the tilde above the letter?
In a variable name? That's not going to work.
In the title or axis label of an axes? Set the object's Interpreter property to LaTeX and use the \tilde command.
text(0.5, 0.5, '$$\tilde{a}$$', 'Interpreter', 'LaTeX')
Somewhere else? Tell us where.