MATLAB Answers

TeX problem -- why?

7 views (last 30 days)
Igor
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
Igor on 5 May 2011
error even for {}
Warning: Unable to interpret TeX string "\sqrt{5}"

Sign in to comment.

Accepted Answer

Teja Muppirala
Teja Muppirala on 5 May 2011
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
Igor on 5 May 2011
Thanks

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!