laTex数学公式

一个在线编辑器 http://www.codecogs.com/latex/eqneditor.php

1.分数的表示

\frac{1}{\sqrt2}

\[\frac{1}{\sqrt2}\]

2.矩阵的表示

\begin{bmatrix}
2 & \cdots & 3 \\
  \vdots& \ddots & \vdots\\
  4& \cdots & 9
\end{bmatrix}


\begin{equation}
S
=\begin{bmatrix}
A  &  B  & \cdots\ &C\\
D  &  E  & \cdots\ & F\\
  \vdots   & \vdots & \ddots  & \vdots  \\
  G & H  & \cdots\ & I\\
\end{bmatrix}
\end{equation}

3.偏导数与微分

\bigg(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\bigg)^T

\[\bigg(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}\bigg)^T\]

\bigtriangledown{f(x,y)}

\[\bigtriangledown{f(x,y)}\]

4.长公式换行及行号

\begin{equation} \begin{split} n&=\left[\frac{b-a}{0.01}\right]+1, \\ S&=\frac{1}{n}\sum\limits_{j=1}^{n}(\lambda_{0j}-\lambda_{j}). \end{split}\end{equation}

在上面这个公式里面,行号是自动添加的,它根据整个网页中的公式来进行编号,比如前面的矩阵行号是1,则这儿自动变为2,


5.分行对齐


\begin{align*} L(\theta) &=\prod_{i=1}^{m}p(y^{(i)}|x^{(i)};\theta) \\
&=\prod_{i=1}^{m}\frac{1}{\sqrt{2\pi}\sigma}exp\big(-\frac{(y^{(i)}-\theta^Tx^{(i)})^2}{2\sigma^2}\big) \end{align*}

posted on 2017-10-06 09:47  迈克老狼2012  阅读(343)  评论(0编辑  收藏  举报

导航