【发布时间】:2018-04-02 18:55:44
【问题描述】:
我正在复制一篇文章的表格,我需要表格是表格的文字宽度并在for字下方添加一个竖线,我附上我的代码。
% Please add the following required packages to your document preamble:
% \usepackage{booktabs}
\begin{table}[h]
\centering
\label{my-label}
\begin{tabular}{@{}l@{}}
\toprule
\textbf{Algorithm 2:} The Forward algorithm \\ \midrule
\textbf{Initialization:} \\
\ $\alpha_1(i) = \pi_i bi(O_1), \ 1 \leq i \leq K$ \\
\\
\textbf{Recursion:} \\
\textbf{for} t = 1,..., T-1 \textbf{do} \\
\ \ \ \textbf{for} j = 1,..., K do \\
\ \ \ \ \ \ \ $\alpha_{t+1}(j) = \left [\sum_{i=1}^{k} \alpha_t (i) \alpha_{ij},\right ] b_j(O_{t+1})$ \\
\ \ \ \textbf{end} \\
\textbf{end} \\
\\
\textbf{Result:} $P(O_{1:T}) = \sum_{i=1}^N \alpha_T (i)$ \\ \bottomrule
\end{tabular}
\end{table}
我期望的结果是上乘图像中的结果。任何想法。
【问题讨论】:
标签: latex