[問題] 表格內插入矩陣

看板LaTeX (論文排版)作者時間15年前 (2010/06/27 03:54), 編輯推噓3(302)
留言5則, 4人參與, 最新討論串1/1
我想在表格內建立一個矩陣,在(5)的地方,不過他不讓我執行 如果在(5)結束後加一個 \end{tabular},就可以,不過(6)以後 的列就不會靠左對齊。嘗試了一晚上依舊失敗。 \begin{table}[!t] \renewcommand{\arraystretch}{1.3} \caption{CLLL algorithm using MATLAB notation} \centering \begin{tabular}{ll}\hline\hline Input: $\mathbf{H}_{p}$; Output: $\mathbf{Q}$, $\mathbf{R}$ $\mathbf{T}$\\ \hline (1) [$\mathbf{Q}$, $\mathbf{R}$] = QR Decomposition($\mathbf{H}_p$);\\ (2) $\delta$ $\in$ $(\frac{1}{2},1)$; \\ (3) $m = size((\mathbf{H}_p),2)$;\\ (4) Swap the $(k-1)$-th and $k$-th columns in $\mathbf{R}$ and $\mathbf{T}$\\ (5) Set \[\mathbf{R} = \left( \begin{array}{cc} \alpha^{H} & \beta \\ -\beta & \alpha \end{array} \right) \] (6) $\mathbf{R}_{k1-:k,k-1:m} = \Theta \mathbf{R}_{k1-:k,k-1:m} $; \end{tabular} \end{table} -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.45.64 ※ 編輯: emitter 來自: 140.113.45.64 (06/27 03:57)

06/27 04:34, , 1F
在表格內插入矩陣是為了排版的緣故嗎?
06/27 04:34, 1F

06/27 04:46, , 2F
因為表格內是演算法,有步驟,某個步驟必須描述矩陣內容
06/27 04:46, 2F

06/27 09:29, , 3F
感覺問題是出在\[ \] 試試用 $$ 來代替吧 (不確定...)
06/27 09:29, 3F

06/27 13:54, , 4F
同樓上...參考 #1AUVq9RP 試試看
06/27 13:54, 4F

06/27 16:38, , 5F
我之前是一直不知道怎麼用 $$來寫矩陣
06/27 16:38, 5F
文章代碼(AID): #1C9bhTRG (LaTeX)
文章代碼(AID): #1C9bhTRG (LaTeX)