2013년 10월 25일 금요일

MATLAB Tip - expressing symbols on a graph with TeX

For engineering students who use MATLAB, I found this resource useful when I wanted to express symbols on the title or axes of scientific graphs. I think TeX is set as an default text interpreter for MATLAB, so you don't have to change the settings to use this. You can use LaTeX, another text interpreter, by changing the setting for more complicated and graphical scientific expressions.

source: http://www.mathworks.com/help/matlab/ref/text_props.html#String

TeX Character Sequence Table
Character Sequence
Symbol
Character Sequence
Symbol
Character Sequence
Symbol
\alpha
α
\upsilon
υ
\sim
~
\angle
\phi
Φ
\leq
\ast
*
\chi
χ
\infty
\beta
β
\psi
ψ
\clubsuit
\gamma
γ
\omega
ω
\diamondsuit
\delta
δ
\Gamma
Γ
\heartsuit
\epsilon
ɛ
\Delta
Δ
\spadesuit
\zeta
ζ
\Theta
Θ
\leftrightarrow
\eta
η
\Lambda
Λ
\leftarrow
\theta
Θ
\Xi
Ξ
\Leftarrow
\vartheta
ϑ
\Pi
Π
\uparrow
\iota
ι
\Sigma
Σ
\rightarrow
\kappa
κ
\Upsilon
ϒ
\Rightarrow
\lambda
λ
\Phi
Φ
\downarrow
\mu
µ
\Psi
Ψ
\circ
º
\nu
ν
\Omega
Ω
\pm
±
\xi
ξ
\forall
\geq
\pi
π
\exists
\propto
\rho
ρ
\ni
\partial
\sigma
σ
\cong
\bullet
\varsigma
ς
\approx
\div
÷
\tau
τ
\Re
\neq
\equiv
\oplus
\aleph
\Im
\cup
\wp
\otimes
\subseteq
\oslash
\cap
\in
\supseteq
\supset
\lceil
\subset
\int
\cdot
·
\o
ο
\rfloor
\neg
¬
\nabla
\lfloor
\times
x
\ldots
...
\perp
\surd
\prime
´
\wedge
\varpi
ϖ
\0
\rceil
\rangle
\mid
|
\vee
\copyright
©
\langle

You can also specify stream modifiers that control font type and color. The first four modifiers are mutually exclusive. However, you can use \fontname in combination with one of the other modifiers:
  • \bf — Bold font
  • \it — Italic font
  • \sl — Oblique font (rarely available)
  • \rm — Normal font
  • \fontname{fontname} — Specify the name of the font family to use.
  • \fontsize{fontsize} — Specify the font size in FontUnits.
  • \color(colorSpec) — Specify color for succeeding characters
Stream modifiers remain in effect until the end of the string or only within the context defined by braces { }.

Use ^ for uppercase, _ for lower case letters