Asked by Igor
on 5 May 2011

This is working

gtext('\Sigma')

gtext('\color {red} 5')

This is not working

gtext('\frac{1}{2}')

gtext('\sqrt(5)')

Why??

Answer by Teja Muppirala
on 5 May 2011

Accepted Answer

MATLAB's TeX does not support those. However, these two will work:

gtext('$\frac{1}{2}$','interpreter','latex','fontsize',50)

gtext('$\sqrt{5}$','interpreter','latex','fontsize',50)

To find out more about tex/latex support in MATLAB, look here:

Opportunities for recent engineering grads.

Apply Today
## 1 Comment

## Igor (view profile)

## Direct link to this comment

https://www.mathworks.com/matlabcentral/answers/6850-tex-problem-why#comment_14100

Sign in to comment.