본문 바로가기
Technology/by Lab

[매트랩 맨띵] 매트랩에 그리스문자, 화살표, 온갖 기호 그리기

by 밝은생각쟁이 2012. 12. 27.
728x90
반응형

출처 : http://wikieducator.org/Help:LaTeX_Symbol_Tables_-_Mathematics

 

matlab으로 그래프 그리다가. 파이, 쎄타, 더하기, 크기 나타내는 부호, 이런거 어떻게 나타내는거야?

하나하나 그래프 그린다음에 텍스트 박스 넣어서 써줘야 하는거야...

혼자 고민하다가 plot 함수로부터 들어들어 가다가, 결국에는 위키에 있는 거 발견.

 

앞으로 얼마나 많은 그래프를 그리게 될지 모르겠지만..

나도.. 매트랩 자유자재로 쓰고 싶다고!!!

 

 

=============== 이런거 그리고 싶었다 ==============


Calculating the Positions of Text Annotations


You can also calculate the positions of text annotations in a graph. The following code adds annotations at three data points on a graph.
t=0:pi/64:2*pi;
plot(t,sin(t));

%% 그래프에 제목 붙이기
title('The Sine of 0 to 2\pi')

%% 그래프에 x label 파이pi , 이렇게 쓰는고만.
xlabel('t = 0 to 2\pi')

%% 그래프에 y축 라벨 붙이기
ylabel('sin(t)')

%%그리고 그래프에 글 쓰기

%% text(x축, y축값, '화살표 설정 -> 왼쪽화살표 가르킴, 폰트사이즈 설정

text(3*pi/4,sin(3*pi/4),...
     '\leftarrowsin(t) = .707',...
     'FontSize',16)

text(pi,sin(pi),'\leftarrowsin(t) = 0',...
     'FontSize',16)

text(5*pi/4,sin(5*pi/4),'sin(t) = -.707\rightarrow',...

%%오른쪽 정렬 명령
     'HorizontalAlignment','right',...
     'FontSize',16)

 

The HorizontalAlignment of the text string 'sin(t) = -.707 \rightarrow'- is set to right to place it on the left side of the point [5*pi/4,sin(5*pi/4)] on the graph. For more information about aligning text annotations, see Text Alignment.

 

 

%%그럼 위키에 잘 정리된 그리스, 기타 수학 기호들 펌....

출처 : http://wikieducator.org/Help:LaTeX_Symbol_Tables_-_Mathematics

Greek Symbols

Name LaTeX Code Lowcase LaTeX Code Capital LaTeX Code Bold Lowcase LaTeX Code Bold Capital
ALPHA \alpha \alpha\, \Alpha \Alpha\, \boldsymbol{\alpha} \boldsymbol{\alpha} \boldsymbol{\Alpha} \boldsymbol{\Alpha}
BETA \beta \beta\, \Beta \Beta\, \boldsymbol{\beta} \boldsymbol{\beta} \boldsymbol{\Beta} \boldsymbol{\Beta}
GAMMA \gamma \gamma\, \Gamma \Gamma\, \boldsymbol{\gamma} \boldsymbol{\gamma} \boldsymbol{\Gamma} \boldsymbol{\Gamma}
DIGAMMA \digamma \digamma\, \boldsymbol{\digamma} \boldsymbol{\digamma}
DELTA \delta \delta\, \Delta \Delta\, \boldsymbol{\delta} \boldsymbol{\delta} \boldsymbol{\Delta} \boldsymbol{\Delta}
EPSILON \epsilon \epsilon\, \Epsilon \Epsilon\, \boldsymbol{\epsilon} \boldsymbol{\epsilon} \boldsymbol{\Epsilon} \boldsymbol{\Epsilon}
VAREPSILON \varepsilon \varepsilon\, \boldsymbol{\varepsilon} \boldsymbol{\varepsilon}
ZETA \zeta \zeta\, Z \Zeta\, \boldsymbol{\zeta} \boldsymbol{\zeta} \boldsymbol{Z} \boldsymbol{\Zeta}
ETA \eta \eta\, \Eta \Eta\, \boldsymbol{\eta} \boldsymbol{\eta} \boldsymbol{\Eta} \boldsymbol{\Eta}
THETA \theta \theta\, \Theta \Theta\, \boldsymbol{\theta} \boldsymbol{\theta} \boldsymbol{\Theta} \boldsymbol{\Theta}
VARTHETA \vartheta \vartheta\, \boldsymbol{\vartheta} \boldsymbol{\vartheta}
IOTA \iota \iota\, \Iota \Iota\, \boldsymbol{\iota} \boldsymbol{\iota} \boldsymbol{\Iota} \boldsymbol{\Iota}
KAPPA \kappa \kappa\, \Kappa \Kappa\, \boldsymbol{\kappa} \boldsymbol{\kappa} \boldsymbol{\Kappa} \boldsymbol{\Kappa}
VARKAPPA \varkappa \varkappa\, \boldsymbol{\varkappa} \boldsymbol{\varkappa}
LAMBDA \lambda \lambda\, \Lambda \Lambda\, \boldsymbol{\lambda} \boldsymbol{\lambda} \boldsymbol{\Lambda} \boldsymbol{\Lambda}
MU \mu \mu\, \Mu \Mu\, \boldsymbol{\mu} \boldsymbol{\mu} \boldsymbol{\Mu} \boldsymbol{\Mu}
NU \nu \nu\, \Nu \Nu\, \boldsymbol{\nu} \boldsymbol{\nu} \boldsymbol{\Nu} \boldsymbol{\Nu}
XI \xi \xi\, \Xi \Xi\, \boldsymbol{\xi} \boldsymbol{\xi} \boldsymbol{\Xi} \boldsymbol{\Xi}
OMICRON o o\, O O\, \boldsymbol{o} \boldsymbol{o} \boldsymbol{O} \boldsymbol{O}
PI \pi \pi\, \Pi \Pi\, \boldsymbol{\pi} \boldsymbol{\pi} \boldsymbol{\Pi} \boldsymbol{\Pi}
VARPI \varpi \varpi\, \boldsymbol{\varpi} \boldsymbol{\varpi}
RHO \rho \rho\, \Rho \Rho\, \boldsymbol{\rho} \boldsymbol{\rho} \boldsymbol{\Rho} \boldsymbol{\Rho}
VARRHO \varrho \varrho\, \boldsymbol{\varrho} \boldsymbol{\varrho}
SIGMA \sigma \sigma\, \Sigma \Sigma\, \boldsymbol{\sigma} \boldsymbol{\sigma} \boldsymbol{\Sigma} \boldsymbol{\Sigma}
VARSIGMA \varsigma \varsigma\, \boldsymbol{\varsigma} \boldsymbol{\varsigma}
TAU \tau \tau\, \Tau \Tau\, \boldsymbol{\tau} \boldsymbol{\tau} \boldsymbol{\Tau} \boldsymbol{\Tau}
UPSILON \upsilon \upsilon\, \Upsilon \Upsilon\, \boldsymbol{\upsilon} \boldsymbol{\upsilon} \boldsymbol{\Upsilon} \boldsymbol{\Upsilon}
PHI \phi \phi\, \Phi \Phi\, \boldsymbol{\phi} \boldsymbol{\phi} \boldsymbol{\Phi} \boldsymbol{\Phi}
VARPHI \varphi \varphi\, \boldsymbol{\varphi} \boldsymbol{\varphi}
CHI \chi \chi\, \Chi \Chi\, \boldsymbol{\chi} \boldsymbol{\chi} \boldsymbol{\Chi} \boldsymbol{\Chi}
PSI \psi \psi\, \Psi \Psi\, \boldsymbol{\psi} \boldsymbol{\psi} \boldsymbol{\Psi} \boldsymbol{\Psi}
OMEGA \omega \omega\, \Omega \Omega\, \boldsymbol{\omega} \boldsymbol{\omega} \boldsymbol{\Omega} \boldsymbol{\Omega}

 

Arrows

LaTeX Code Output LaTeX Code Output LaTeX Code Output LaTeX Code Output
\Downarrow \Downarrow \longleftarrow \longleftarrow \nwarrow \nwarrow \downarrow \downarrow
\Longleftarrow \Longleftarrow \Rightarrow \Rightarrow \hookleftarrow \hookleftarrow \longleftrightarrow \longleftrightarrow
\rightarrow \rightarrow \hookrightarrow \hookrightarrow \Longleftrightarrow \Longleftrightarrow \searrow \searrow
\longmapsto \longmapsto \swarrow \swarrow \leftarrow \leftarrow \Updownarrow \Updownarrow
\Longrightarrow \Longrightarrow \uparrow \uparrow \Leftarrow \Leftarrow \longrightarrow \longrightarrow
\Uparrow \Uparrow \Leftrightarrow \Leftrightarrow \mapsto \mapsto \updownarrow \updownarrow
\leftrightarrow \leftrightarrow \nearrow ↑ \nearrow

Operators

+ \oplus \bigoplus \pm \mp - + \oplus \bigoplus \pm \mp - \,\!
\times \otimes \bigotimes \cdot \circ \bullet \bigodot \times \otimes \bigotimes \cdot \circ \bullet \bigodot\,\!
\star * / \div \frac{1}{2} \star * / \div \frac{1}{2}\,\!

Logic

\land (or \and) \wedge \bigwedge \bar{q} \to p \land \wedge \bigwedge \bar{q} \to p\,\!
\lor \vee \bigvee \lnot \neg q \And \lor \vee \bigvee \lnot \neg q \And\,\!

Root

\sqrt{2} \sqrt[n]{x} \sqrt{2} \sqrt[n]{x}\,\!

Relations

\sim \approx \simeq \cong \dot= \overset{\underset{\mathrm{def}}{}}{=} \sim \approx \simeq \cong \dot=  \overset{\underset{\mathrm{def}}{}}{=}\,\!
\le < \ll \gg \ge > \equiv \not\equiv \ne \mbox{or} \neq \propto \le < \ll \gg \ge > \equiv \not\equiv \ne \mbox{or} \neq \propto\,\!

Geometric

\Diamond \Box \triangle \angle \perp \mid \nmid \| 45^\circ \Diamond \, \Box \, \triangle \, \angle \perp \, \mid \; \nmid \, \| 45^\circ\,\!

Arrows

\leftarrow (or \gets) \rightarrow (or \to) \nleftarrow \nrightarrow \leftrightarrow \nleftrightarrow \longleftarrow \longrightarrow \longleftrightarrow \leftarrow \rightarrow \nleftarrow \not\to \leftrightarrow \nleftrightarrow \longleftarrow \longrightarrow \longleftrightarrow \,\!
\Leftarrow \Rightarrow \nLeftarrow \nRightarrow \Leftrightarrow \nLeftrightarrow \Longleftarrow \Longrightarrow \Longleftrightarrow (or \iff) \Leftarrow \Rightarrow \nLeftarrow \nRightarrow \Leftrightarrow \nLeftrightarrow \Longleftarrow \Longrightarrow \Longleftrightarrow \!
\uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow \nearrow \searrow \swarrow \nwarrow \uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow  \nearrow \searrow \swarrow \nwarrow \!
\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons \rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons \,\!
\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \Rrightarrow \rightarrowtail \looparrowright \curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \Rrightarrow \rightarrowtail \looparrowright \,\!
\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \Lleftarrow \leftarrowtail \looparrowleft \curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \Lleftarrow \leftarrowtail \looparrowleft \,\!
\mapsto \longmapsto \hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \mapsto \longmapsto \hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \,\!

Special

\And \eth \S \P \% \dagger \ddagger \ldots \cdots \And \eth \S \P \% \dagger \ddagger \ldots \cdots\,\!
\smile \frown \wr \triangleleft \triangleright \infty \bot \top \smile \frown \wr \triangleleft \triangleright \infty \bot \top\,\!
\vdash \vDash \Vdash \models \lVert \rVert \imath \hbar \vdash \vDash \Vdash \models \lVert \rVert \imath \hbar\,\!
\ell \mho \Finv \Re \Im \wp \complement \ell \mho \Finv \Re \Im \wp \complement\,\!
\diamondsuit \heartsuit \clubsuit \spadesuit \Game \flat \natural \sharp \diamondsuit \heartsuit \clubsuit \spadesuit \Game \flat \natural \sharp\,\!

Unsorted (new stuff)

\vartriangle \triangledown \lozenge \circledS \measuredangle \nexists \Bbbk \backprime \blacktriangle \blacktriangledown  \vartriangle \triangledown \lozenge \circledS \measuredangle \nexists \Bbbk \backprime \blacktriangle \blacktriangledown
\blacksquare \blacklozenge \bigstar \sphericalangle \diagup \diagdown \dotplus \Cap \Cup \barwedge  \blacksquare \blacklozenge \bigstar \sphericalangle \diagup \diagdown \dotplus \Cap \Cup \barwedge\!
\veebar \doublebarwedge \boxminus \boxtimes \boxdot \boxplus \divideontimes \ltimes \rtimes \leftthreetimes  \veebar \doublebarwedge \boxminus \boxtimes \boxdot \boxplus \divideontimes \ltimes \rtimes \leftthreetimes
\rightthreetimes \curlywedge \curlyvee \circleddash \circledast \circledcirc \centerdot \intercal \leqq \leqslant  \rightthreetimes \curlywedge \curlyvee \circleddash \circledast \circledcirc \centerdot \intercal \leqq \leqslant
\eqslantless \lessapprox \approxeq \lessdot \lll \lessgtr \lesseqgtr \lesseqqgtr \doteqdot \risingdotseq  \eqslantless \lessapprox \approxeq \lessdot \lll \lessgtr \lesseqgtr \lesseqqgtr \doteqdot \risingdotseq
\fallingdotseq \backsim \backsimeq \subseteqq \Subset \preccurlyeq \curlyeqprec \precsim \precapprox \vartriangleleft  \fallingdotseq \backsim \backsimeq \subseteqq \Subset \preccurlyeq \curlyeqprec \precsim \precapprox \vartriangleleft
\Vvdash \bumpeq \Bumpeq \geqq \geqslant \eqslantgtr \gtrsim \gtrapprox \eqsim \gtrdot  \Vvdash \bumpeq \Bumpeq \geqq \geqslant \eqslantgtr \gtrsim \gtrapprox \eqsim \gtrdot
\ggg \gtrless \gtreqless \gtreqqless \eqcirc \circeq \triangleq \thicksim \thickapprox \supseteqq  \ggg \gtrless \gtreqless \gtreqqless \eqcirc \circeq \triangleq \thicksim \thickapprox \supseteqq
\Supset \succcurlyeq \curlyeqsucc \succsim \succapprox \vartriangleright \shortmid \shortparallel \between \pitchfork  \Supset \succcurlyeq \curlyeqsucc \succsim \succapprox \vartriangleright \shortmid \shortparallel \between \pitchfork
\varpropto \blacktriangleleft \therefore \backepsilon \blacktriangleright \because \nleqslant \nleqq \lneq \lneqq  \varpropto \blacktriangleleft \therefore \backepsilon \blacktriangleright \because \nleqslant \nleqq \lneq \lneqq
\lvertneqq \lnsim \lnapprox \nprec \npreceq \precneqq \precnsim \precnapprox \nsim \nshortmid  \lvertneqq \lnsim \lnapprox \nprec \npreceq \precneqq \precnsim \precnapprox \nsim \nshortmid
\nvdash \nVdash \ntriangleleft \ntrianglelefteq \nsubseteq \nsubseteqq \varsubsetneq \subsetneqq \varsubsetneqq \ngtr  \nvdash \nVdash \ntriangleleft \ntrianglelefteq \nsubseteq \nsubseteqq \varsubsetneq \subsetneqq \varsubsetneqq \ngtr
\subsetneq \subsetneq
\ngeqslant \ngeqq \gneq \gneqq \gvertneqq \gnsim \gnapprox \nsucc \nsucceq \succneqq  \ngeqslant \ngeqq \gneq \gneqq \gvertneqq \gnsim \gnapprox \nsucc \nsucceq \succneqq
\succnsim \succnapprox \ncong \nshortparallel \nparallel \nvDash \nVDash \ntriangleright \ntrianglerighteq \nsupseteq  \succnsim \succnapprox \ncong \nshortparallel \nparallel \nvDash \nVDash \ntriangleright \ntrianglerighteq \nsupseteq
\nsupseteqq \varsupsetneq \supsetneqq \varsupsetneqq  \nsupseteqq \varsupsetneq \supsetneqq \varsupsetneqq
\jmath \surd \ast \uplus \diamond \bigtriangleup \bigtriangledown \ominus \jmath \surd \ast \uplus \diamond \bigtriangleup \bigtriangledown \ominus\,\!
\oslash \odot \bigcirc \amalg \prec \succ \preceq \succeq \oslash \odot \bigcirc \amalg \prec \succ \preceq \succeq\,\!
\dashv \asymp \doteq \parallel \dashv \asymp \doteq \parallel\,\!
\ulcorner \urcorner \llcorner \lrcorner \ulcorner \urcorner \llcorner \lrcorner

Larger Expressions

Subscripts, superscripts, integrals

Feature Syntax How it looks rendered
HTML PNG
Superscript a^2 a2 a^2 \,\!
Subscript a_2 a2 a_2 \,\!
Grouping a^{2+2} a2 + 2 a^{2+2}\,\!
a_{i,j} ai,j a_{i,j}\,\!
Combining sub & super without and with horizontal separation x_2^3 x_2^3 x_2^3 \,\!
{x_2}^3 {x_2}^3 {x_2}^3 \,\!
Super super 10^{10^{ \,\!{8} } 10^{10^{ \,\! 8 } }
Super super 10^{10^{ \overset{8}{} }} 10^{10^{ \overset{8}{} }}
Super super (wrong in HTML in some browsers) 10^{10^8} 10^{10^8}
Preceding and/or Additional sub & super \sideset{_1^2}{_3^4}\prod_a^b \sideset{_1^2}{_3^4}\prod_a^b
{}_1^2\!\Omega_3^4 {}_1^2\!\Omega_3^4
Stacking \overset{\alpha}{\omega} \overset{\alpha}{\omega}
\underset{\alpha}{\omega} \underset{\alpha}{\omega}
\overset{\alpha}{\underset{\gamma}{\omega}} \overset{\alpha}{\underset{\gamma}{\omega}}
\stackrel{\alpha}{\omega} \stackrel{\alpha}{\omega}
Derivative (forced PNG) x', y'', f', f''\! x', y'', f', f''\!
Derivative (f in italics may overlap primes in HTML) x', y'', f', f'' x',y'',f',f'' x', y'', f', f''\!
Derivative (wrong in HTML) x^\prime, y^{\prime\prime} x^\prime, y^{\prime\prime} x^\prime, y^{\prime\prime}\,\!
Derivative (wrong in PNG) x\prime, y\prime\prime x\prime, y\prime\prime x\prime, y\prime\prime\,\!
Derivative dots \dot{x}, \ddot{x} \dot{x}, \ddot{x}
Underlines, overlines, vectors \hat a \ \bar b \ \vec c \hat a \ \bar b \ \vec c
\overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f} \overrightarrow{a b} \ \overleftarrow{c d} \ \widehat{d e f}
\overline{g h i} \ \underline{j k l} \overline{g h i} \ \underline{j k l}
Arrows A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C  A \xleftarrow{n+\mu-1} B \xrightarrow[T]{n\pm i-1} C
Overbraces \overbrace{ 1+2+\cdots+100 }^{5050} \overbrace{ 1+2+\cdots+100 }^{5050}
Underbraces \underbrace{ a+b+\cdots+z }_{26} \underbrace{ a+b+\cdots+z }_{26}
Sum \sum_{k=1}^N k^2 \sum_{k=1}^N k^2
Sum (force \textstyle) \textstyle \sum_{k=1}^N k^2 \textstyle \sum_{k=1}^N k^2
Product \prod_{i=1}^N x_i \prod_{i=1}^N x_i
Product (force \textstyle) \textstyle \prod_{i=1}^N x_i \textstyle \prod_{i=1}^N x_i
Coproduct \coprod_{i=1}^N x_i \coprod_{i=1}^N x_i
Coproduct (force \textstyle) \textstyle \coprod_{i=1}^N x_i \textstyle \coprod_{i=1}^N x_i
Limit \lim_{n \to \infty}x_n \lim_{n \to \infty}x_n
Limit (force \textstyle) \textstyle \lim_{n \to \infty}x_n \textstyle \lim_{n \to \infty}x_n
Integral \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx \int\limits_{1}^{3}\frac{e^3/x}{x^2}\, dx
Integral (alternate limits style) \int_{1}^{3}\frac{e^3/x}{x^2}\, dx \int_{1}^{3}\frac{e^3/x}{x^2}\, dx
Integral (force \textstyle) \textstyle \int\limits_{-N}^{N} e^x\, dx \textstyle \int\limits_{-N}^{N} e^x\, dx
Integral (force \textstyle, alternate limits style) \textstyle \int_{-N}^{N} e^x\, dx \textstyle \int_{-N}^{N} e^x\, dx
Double integral \iint\limits_D \, dx\,dy \iint\limits_D \, dx\,dy
Triple integral \iiint\limits_E \, dx\,dy\,dz \iiint\limits_E \, dx\,dy\,dz
Quadruple integral \iiiint\limits_F \, dx\,dy\,dz\,dt \iiiint\limits_F \, dx\,dy\,dz\,dt
Line or path integral \int_C x^3\, dx + 4y^2\, dy \int_C x^3\, dx + 4y^2\, dy
Closed line or path integral \oint_C x^3\, dx + 4y^2\, dy \oint_C x^3\, dx + 4y^2\, dy
Intersections \bigcap_1^n p \bigcap_1^n p
Unions \bigcup_1^k p \bigcup_1^k p

Fractions, matrices, multilines

Feature Syntax How it looks rendered
Fractions \frac{2}{4}=0.5 \frac{2}{4}=0.5
Small Fractions \tfrac{2}{4} = 0.5 \tfrac{2}{4} = 0.5
Large (normal) Fractions \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a
Large (nested) Fractions \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a
Binomial coefficients \binom{n}{k} \binom{n}{k}
Small Binomial coefficients \tbinom{n}{k} \tbinom{n}{k}
Large (normal) Binomial coefficients \dbinom{n}{k} \dbinom{n}{k}
Matrices
\begin{matrix}
  x & y \\
  z & v 
\end{matrix}
\begin{matrix} x & y \\ z & v
\end{matrix}
\begin{vmatrix}
  x & y \\
  z & v 
\end{vmatrix}
\begin{vmatrix} x & y \\ z & v
\end{vmatrix}
\begin{Vmatrix}
  x & y \\
  z & v
\end{Vmatrix}
\begin{Vmatrix} x & y \\ z & v
\end{Vmatrix}
\begin{bmatrix}
  0      & \cdots & 0      \\
  \vdots & \ddots & \vdots \\ 
  0      & \cdots & 0
\end{bmatrix}
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots
& \ddots & \vdots \\ 0 & \cdots &
0\end{bmatrix}
\begin{Bmatrix}
  x & y \\
  z & v
\end{Bmatrix}
\begin{Bmatrix} x & y \\ z & v
\end{Bmatrix}
\begin{pmatrix}
  x & y \\
  z & v 
\end{pmatrix}
\begin{pmatrix} x & y \\ z & v
\end{pmatrix}
\bigl( \begin{smallmatrix}
  a&b\\ c&d
\end{smallmatrix} \bigr)

\bigl( \begin{smallmatrix}
  a&b\\ c&d
\end{smallmatrix} \bigr)
Case distinctions
f(n) = 
\begin{cases} 
  n/2,  & \mbox{if }n\mbox{ is even} \\
  3n+1, & \mbox{if }n\mbox{ is odd} 
\end{cases}
f(n) = 
\begin{cases}
  n/2,  & \mbox{if }n\mbox{ is even} \\ 
  3n+1, & \mbox{if }n\mbox{ is odd} 
\end{cases}
Multiline equations
\begin{align}
 f(x) & = (a+b)^2 \\
      & = a^2+2ab+b^2 \\
\end{align}

\begin{align}
 f(x) & = (a+b)^2 \\
      & = a^2+2ab+b^2 \\
\end{align}
\begin{alignat}{2}
 f(x) & = (a-b)^2 \\
      & = a^2-2ab+b^2 \\
\end{alignat}

\begin{alignat}{2}
 f(x) & = (a-b)^2 \\
      & = a^2-2ab+b^2 \\
\end{alignat}
Multiline equations (must define number of colums used ({lcr}) (should not be used unless needed)
\begin{array}{lcl}
  z        & = & a \\
  f(x,y,z) & = & x + y + z  
\end{array}
\begin{array}{lcl}
  z        & = & a \\
  f(x,y,z) & = & x + y + z  
\end{array}
Multiline equations (more)
\begin{array}{lcr}
  z        & = & a \\
  f(x,y,z) & = & x + y + z     
\end{array}
\begin{array}{lcr}
  z        & = & a \\
  f(x,y,z) & = & x + y + z     
\end{array}
Breaking up a long expression so that it wraps when necessary
<math>f(x) \,\!</math>
<math>= \sum_{n=0}^\infty a_n x^n </math>
<math>= a_0+a_1x+a_2x^2+\cdots</math>

f(x) \,\!= \sum_{n=0}^\infty a_n x^n = a_0 +a_1x+a_2x^2+\cdots

Simultaneous equations
\begin{cases}
    3x + 5y +  z \\
    7x - 2y + 4z \\
   -6x + 3y + 2z 
\end{cases}
\begin{cases} 3x + 5y + z \\ 7x - 2y + 4z \\ -6x + 3y + 2z \end{cases}
Arrays
\begin{array}{|c|c||c|} a & b & S \\
\hline
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0\\
\end{array}

\begin{array}{|c|c||c|} a & b & S \\
\hline
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0\\
\end{array}

Parenthesizing big expressions, brackets, bars

Feature Syntax How it looks rendered
Bad ( \frac{1}{2} ) ( \frac{1}{2} )
Good \left ( \frac{1}{2} \right ) \left ( \frac{1}{2} \right )

You can use various delimiters with \left and \right:

Feature Syntax How it looks rendered
Parentheses \left ( \frac{a}{b} \right ) \left ( \frac{a}{b} \right )
Brackets \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack \left [ \frac{a}{b} \right ] \quad \left \lbrack \frac{a}{b} \right \rbrack
Braces \left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace \left \{ \frac{a}{b} \right \} \quad \left \lbrace \frac{a}{b} \right \rbrace
Angle brackets \left \langle \frac{a}{b} \right \rangle \left \langle \frac{a}{b} \right \rangle
Bars and double bars \left | \frac{a}{b} \right \vert \left \Vert \frac{c}{d} \right \| \left | \frac{a}{b} \right \vert \left \Vert \frac{c}{d} \right \|
Floor and ceiling functions: \left \lfloor \frac{a}{b} \right \rfloor \left \lceil \frac{c}{d} \right \rceil \left \lfloor \frac{a}{b} \right \rfloor \left \lceil \frac{c}{d} \right \rceil
Slashes and backslashes \left / \frac{a}{b} \right \backslash \left / \frac{a}{b} \right \backslash
Up, down and up-down arrows \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow \left \uparrow \frac{a}{b} \right \downarrow \quad \left \Uparrow \frac{a}{b} \right \Downarrow \quad \left \updownarrow \frac{a}{b} \right \Updownarrow
Delimiters can be mixed,
as long as \left and \right match
\left [ 0,1 \right )</code> <br/> <code>\left \langle \psi \right | \left [ 0,1 \right )
\left \langle \psi \right |
Use \left. and \right. if you don't
want a delimiter to appear:
\left . \frac{A}{B} \right \} \to X \left . \frac{A}{B} \right \} \to X
Size of the delimiters \big( \Big( \bigg( \Bigg( \dots \Bigg] \bigg] \Big] \big]/<code> \big( \Big( \bigg( \Bigg( \dots \Bigg] \bigg] \Big] \big]
<code>\big\{ \Big\{ \bigg\{ \Bigg\{ \dots \Bigg\rangle \bigg\rangle \Big\rangle \big\rangle \big\{ \Big\{ \bigg\{ \Bigg\{ \dots \Bigg\rangle \bigg\rangle \Big\rangle \big\rangle
\big\| \Big\| \bigg\| \Bigg\| \dots \Bigg| \bigg| \Big| \big| \big\| \Big\| \bigg\| \Bigg\| \dots \Bigg| \bigg| \Big| \big|
\big\lfloor \Big\lfloor \bigg\lfloor \Bigg\lfloor \dots \Bigg\rceil \bigg\rceil \Big\rceil \big\rceil \big\lfloor \Big\lfloor \bigg\lfloor \Bigg\lfloor \dots \Bigg\rceil \bigg\rceil \Big\rceil \big\rceil
\big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow \dots \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow \big\uparrow \Big\uparrow \bigg\uparrow \Bigg\uparrow \dots \Bigg\Downarrow \bigg\Downarrow \Big\Downarrow \big\Downarrow
\big\updownarrow \Big\updownarrow \bigg\updownarrow \Bigg\updownarrow \dots \Bigg\Updownarrow \bigg\Updownarrow \Big\Updownarrow \big\Updownarrow \big\updownarrow \Big\updownarrow \bigg\updownarrow \Bigg\updownarrow \dots \Bigg\Updownarrow \bigg\Updownarrow \Big\Updownarrow \big\Updownarrow
\big / \Big / \bigg / \Bigg / \dots \Bigg\backslash \bigg\backslash \Big\backslash \big\backslash \big / \Big / \bigg / \Bigg / \dots \Bigg\backslash \bigg\backslash \Big\backslash \big\backslash
728x90
반응형