7

The error is

Undefined control sequence.

Here is the code:

\begin{table}[htb!!]
\center
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{Experiment} & Initial tip deflection & frequency $\omega$ & base acceleration $a_b$ & Magnet gap $\delta$ \\
\hline
TC 1 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\ $5\ mm$\end{tabular} & Uniform $\in [9,14]\ Hz$ & $1\ m/s^2$ & $50\ mm$ \\
\hline
TC 2 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\ $5\ mm$\end{tabular} & $11.5 \ Hz$ & Uniform $ \in \left[ 0.5,1.5 \right]\ m\s^2 $ & $50\ mm$\\
\hline
TC 3 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\ $5\ mm$\end{tabular} & $11.5\ Hz$ & $1\ m/s^2$ & Uniform $\in [45,55]\ mm$\\
\hline
\multicolumn{2}{|c|}{TC 4} & Uniform $\in [0,5]\ mm$ & Uniform $\in [9,14]\ Hz$ & Uniform $\in [0.5,1.5]\ m/s^2$ & Uniform $\in [45,55]\ mm$ \\
\hline
\end{tabular}
\caption{Uncertain parameters/initial conditions }\label{table_exp}
\end{table}
3
  • 6
    Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem.
    – adn
    Apr 15, 2015 at 17:42
  • 1
    Use \centering instead of \center (which is used by \begin{center}). Apr 15, 2015 at 17:44
  • Remember to accept the answer you find most useful (if, indeed, any of them are useful to you). Apr 27, 2015 at 2:48

3 Answers 3

6
! Undefined control sequence.
l.13 ... Uniform $ \in \left[ 0.5,1.5 \right]\ m\s

You have \s instead of /s

5

Since David has already answered your question, I'll allow myself to 'just' improve on the aesthetics of the table:

\documentclass{article}

\usepackage[margin = 3.5cm]{geometry}     % avoid `overfull \hbox' warning
\usepackage[tableposition = top]{caption} % captions
\usepackage{booktabs}                     % horizontal lines in tables
\usepackage[per-mode = symbol]{siunitx}   % physical quantities and SI units

% shortcut
\newcommand*\mr[2]{\begin{tabular}{c}#1\\#2\end{tabular}}

\begin{document}

\noindent \textsf{Note:} Let $U[a,b]$ denote the uniform on the closed interval from $a$ to $b$.

\begin{table}[htbp]
\centering
 \caption{Uncertain parameters/initial conditions.}
 \label{table_exp}
  \begin{tabular}{*{6}{c}}
   \toprule
    \multicolumn{2}{c}{Experiment} & Initial tip deflection & Frequency, $\omega$ & Base acceleration, $a_{\textnormal{b}}$ & Magnet gap, $\delta$ \\[0.5ex]
         &                         & \si{\mm}               & \si{\Hz}            & \si{\m\per\square\s} & \si{\mm}             \\
   \midrule
    TC 1 & \mr{a}{b}               & \mr{$10^{-3}$}{$5$}    & $U[9,14]$           & $1$                                     & $50$                 \\
   \midrule
    TC 2 & \mr{a}{b}               & \mr{$10^{-3}$}{$5$}    & $11.5$              & $U[0.5, 1.5]$                           & $50$                 \\
   \midrule
    TC 3 & \mr{a}{b}               & \mr{$10^{-3}$}{$5$}    & $11.5$              & $1$                                     & $U[45, 55]$          \\
   \midrule
    TC 4 &                         & $U[0,5]$               & $U[9,14]$           & $U[0.5, 1.5]$                           & $U[45, 55]$          \\
   \bottomrule
  \end{tabular}
\end{table}

\end{document}

output

A few suggestions:

  • Don't use vertical lines in table; they disturb the more than they help.
  • Use the siunitx package to typeset the numbers and physical units in the table.
  • Use the booktabs package to get a better thickness of -- and spacing around -- the horizontal rules.
  • Use the caption package with the option tableposition = top to get better spacing between the caption and the table.
  • Use the syntax *{<number of columns>}{<column type>} where possible to shorten the code.
  • Structure the input code to make it look like the output to get a better overview of it.
1

Here is the corrected code. Notice that the lines giving error need to be adjusted to eliminate m\s^2 and include the corrected m/s^2 for units.

\begin{table}[htb!!]
\centering
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\multicolumn{2}{|c|}{Experiment} & Initial tip deflection & frequency $\omega$ & 
base acceleration $a_b$ & Magnet gap $\delta$ \\
\hline
TC 1 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\ 
$5\ mm$\end{tabular} & Uniform $\in [9,14]\ Hz$ & $1\ m/s^2$ & $50\ mm$ \\
\hline
TC 2 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\ 
$5\ mm$\end{tabular} & $11.5 \ Hz$ & Uniform $ \in \left[ 0.5,1.5 \right]\ m/s^2 $ & $50\ mm$\\
\hline
TC 3 &
\begin{tabular}{c}a \\ b\end{tabular} & \begin{tabular}{c} $10^{-3}\ mm$ \\
$5\ mm$\end{tabular} & $11.5\ Hz$ & $1\ m/s^2$ & Uniform $\in [45,55]\ mm$\\
\hline
\multicolumn{2}{|c|}{TC 4} & Uniform $\in [0,5]\ mm$ & Uniform $\in [9,14]\ Hz$ & Uniform 
$\in [0.5,1.5]\ m/s^2$ & Uniform $\in [45,55]\ mm$ \\
\hline
\end{tabular}
\caption{Uncertain parameters/initial conditions }\label{table_exp}
\end{table}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .