MATLAB Answers

Igor
0

TeX problem -- why?

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??

  1 Comment

Igor
on 5 May 2011
error even for {}
Warning: Unable to interpret TeX string "\sqrt{5}"

Sign in to comment.

Tags

1 Answer

Teja Muppirala
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:

  1 Comment

Igor
on 5 May 2011
Thanks

Sign in to comment.