MATLAB: How to obtain bold formatted mathematical expressions in MATLAB using LaTeX

$boldboldmatherrorfontlabel;latexmathMATLABmissingtextext;

I want to place mathematical expressions in bold format on my plot. I have tried to use the {\bf} and {\textbf} declarations, but I receive an error and the expression does not get displayed. I am using the following commands to obtain the bold mathematical expressions:
text('position',[0.5 0.5],'Interpreter','latex','String','$\bf{\alpha}$')
This gives me the following error:
Warning: Unable to interpret TeX string. Undefined control sequence.
The following command uses {\textbf} instead of {\bf}
text('position',[0.5 0.5],'Interpreter','latex','String','$\textbf{\alpha}$')
but this results in the following error:
Warning: Unable to interpret TeX string. Missing $ inserted.

Best Answer

The problem with the above two statements is that they are trying to mix Text mode and Math mode in LaTeX. One way to obtain bold fonts in Math mode is to use the {\boldmath} declaration. The following statement demonstrates the use of{ \boldmath}:
text('position',[0.5 0.5],'Interpreter','latex','String','{\boldmath$\alpha$}')
It is important to note that these commands should not be used in math mode. Thus, a complicated mathematical expression, where only certain symbols are desired in bold font, may be obtained by entering and exiting Math mode as required. Following is an example:
text('position',[0.5 0.5], 'Interpreter','latex','String','$\|${\boldmath${\alpha}$}$\|$');