表格环境中的左花括号

表格环境中的左花括号

我有以下代码:

    \begin{IEEEeqnarray}{c} 
    y = \beta_0 + \sum\limits_{i=1}^{m}{\beta_i x_i} + \sum\limits_{i = 1}^{m} \sum\limits_{j \geq 1}^{m}{\beta_{ij} x_i x_j} + \epsilon
    \label{doe_eq}
\end{IEEEeqnarray}


\begin{tabular}{lll}
    where, & $m$ &= total number of input parameters,\\
     & $x_{i}$ &= $i$th system input,\\
     & $y$ &= system output,\\
     & $\beta_{0}$ &= model constant,\\
     & $\beta_{i}$ &= linear constant,\\
     & $\beta_{ij}$ &= \left \{ \begin{tabular}{l}
                                    interaction constant when $i$\neq$j$,\\
                                    quadratic constant when $i$=$j$,\\
                                 \end{tabular} \\                              
     & $\epsilon$ &= model bias  
\end{tabular}

这样我收到以下错误:

    line 553: Missing $ inserted. & $\beta_{ij}$ &= \left
line 554: Missing $ inserted. interaction constant when $i$\neq
line 555: Missing $ inserted. q
line 557: Missing \right. inserted. &
line 557: Missing $ inserted. &
: Unsupported document class (or package) detected,(caption) usage of the caption package is not recommended.
line 501: Underfull \hbox (badness 10000) in paragraph

我不确定这到底是什么原因造成的。有什么想法吗?

谢谢。

答案1

正如我在评论中所说,\left\neq只能在数学模式下使用,并且\left始终需要匹配\right。此外,我不会写$i$=$j$,即我不会退出数学模式来输入等号。我会将您的表格输入为

\documentclass{article}
\usepackage{amsmath}
\begin{document}
where
\begin{tabular}[t]{ll}
$m$ &= total number of input parameters,\\
$x_{i}$ &= $i$th system input,\\
$y$ &= system output,\\
$\beta_{0}$ &= model constant,\\
$\beta_{i}$ &= linear constant,\\
$\beta_{ij}$ &= $\begin{cases}
                 \text{interaction constant when } i\neq j,\\
                 \text{quadratic constant when } i = j,
                 \end{cases}$\\
$\epsilon$ &= model bias  
\end{tabular}
\end{document}

我删除了一列,将单词“where”放在表格之外,并使用对齐选项将[t]表格的第一行与单词“where”匹配(但这只是个人喜好问题...)。此外,我使用环境casesfromamsmath进行条件定义。= 周围的间距对我来说仍然不太好看,但我认为问题在于解释错误...

编辑:为了改善间距,你可以使用align环境

\begin{align*}
m & =  \text{total number of input parameters,}\\
x_i & =  i\text{th system input,}\\
y & = \text{system output,}\\
\beta_0&=\text{model constant,}\\
\beta_{ij}&= 
\begin{cases}
  \text{interaction constant when }&i\neq j,\\
  \text{quadratic constant when }&i=j
\end{cases},\\
\epsilon&=\text{model bias}
\end{align*}

或者如果你想要符号左对齐,一个alignat环境(但这真的是一个品味问题)

\begin{alignat*}{2}
&m &&= \text{total number of input parameters,}\\
&x_{i} &&= i\text{-th system input,}\\
&y &&= \text{system output,}\\
&\beta_{0} &&= \text{model constant,}\\
&\beta_{i} &&= \text{linear constant,}\\
&\beta_{ij} &&= \begin{cases}
                 \text{interaction constant when } i\neq j,\\
                 \text{quadratic constant when } i = j,
                 \end{cases}\\
&\epsilon &&= \text{model bias} 
\end{alignat*}

答案2

使用align*

where
\begin{align*}
    m & = & \text{total number of input parameters},\\
    x_i & = & i\text{th system input},\\
    y & =& \text{system output},\\
    \beta_0&=&\text{model constant},\\
    \beta_{ij}&=& 
    \begin{cases}
      \text{interaction constant when }&i\neq j,\\
      \text{quadratic constant when }&i=j
    \end{cases},\\
    \epsilon&=&\text{model bias}
\end{align*}

相关内容