Matlab shows latex formula interpreter attributes so that we can display a more complex formula in the graph.

Source: Internet
Author: User

The interpreter attribute of the MATLAB text enables us to display a complex formula in the graph. For example, in the formula, there are not only Greek letters, but also mathematical symbols such as semicolons and roots.
When you type:> set (text, 'interpreter ')
MATLAB returns the property values contained in 'interpreter:
[Latex | {Tex} | none].
The default value is Tex.
The usage of Tex is detailed in the help document of MATLAB. Here we mainly introduce how to use latex to edit formulas.
In Matlab, latex edits the basic format of the formula:
\ (Mathematical formula \), $ mathematical formula $, or $ mathematical formula $.
Specific formula editing commands:
1. Use ^ as the upper mark and the following table to use _. The Greek letter is the same as Tex, that is, \ Alpha indicates α.
2. Sum
$ \ Sum _ {I = 1} ^ {n} X _ {I} $
3. Points
$ \ Int _ {0} ^ {1} $
4. Limit
$ \ Lim _ {n \ rightarrow \ infty} $ % N tends to be an infinite sign directly below Lim
$ \ Lim _ {n \ rightarrow \ infty} $ % the symbol tends to be infinite in the lower right corner of Lim
5. Fraction
$ \ Frac {1} x $ % 1/x
6. Root
$ \ SQRT {x} $
7. dashes
$ \ Overline {x} $
8. Underline
$ \ Underline {x} $ % underline at the bottom of X
9. Horizontal curly braces command
$ \ Overbrace {X + Y + Z + w} $
10. Raised curly braces command
$ A + \ underbrace {B + C + D} $
11. Cap command
$ \ Hat {o} \ check {o} \ breve {o} $
$ \ Widehat {A + B }\\\ widetilde {a + B} $
$ \ VEC {\ imath} + \ VEC {\ jmath} = \ VEC {k} $
12. Build commands
$ Y \ stackrel {\ RM def }{=} f (x) \ stackrel {x \ rightarrow 0 }{\ rightarrow} A $
13. ellipsis
$ \ Cdots \ ldots \ vdots \ ddots $
Example:
H = text;
Set (H, 'interpreter', 'latex ');
Set (H, 'string ', '$ \ sum _ {I = 1} ^ {n} X _ {I} = \ int _ {0} ^ {1} f (x) dx $ ', 'position', [0.1, 0.5], 'fontsize', 16 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.