[Tex/LaTex] \multicolumn not working

multicolumntables

What am I doing wrong? Can't figure it out! Keep receiving \multispan \omit.

Thanks

\begin{center}
    \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
        \hline
        \textbf{taxa de amostragem} & \multicolumn{4}{|c|}{\textbf{44.1k Htz}} & \multicolumn{4}{|c|}{\textbf{48k Htz}} & \multicolumn{4}{|c|}{\textbf{96k Htz}} & \multicolumn{4}{|c|}{\textbf{192k Htz}}\\
        \hline
        \small  \textbf{duração da amostra (ms)} & \small \multicolumn{4}{|c|}{0.0226} & \small \multicolumn{4}{|c|}{0.0208} & \multicolumn{4}{|c|}{0.0104} & \multicolumn{4}{|c|}{0.0052} \\
        \hline
        \small  \textbf{tamanho do bloco} & \small 128 & \small 256 & \small 512 & \small 1024 & \small 128 & \small 256 & \small 512 & \small 1024 & \small 128 & \small 256 & \small 512 & \small 1024 & \small 128 & \small 256 & \small 512 & \small 1024 \\
        \hline
        \small \textbf{duração do bloco (ms)} & \small 2.90 & \small 5.80 & \small 11.60 & \small 23.21 & \small 2.66 & \small 5.33 & \small 10.66 & \small 21.33 & \small 1.33 & \small 2.66 & \small 5.33 & \small 10.66 & \small 0.66 & \small 1.33 & \small 2.66 & \small 5.33 \\
        \hline
    \end{tabular}
\end{center}

Best Answer

I'd rather propose this layout, if it has to fit an ordinary size of paper, with rows and columns swapped, a,d loadin siunitx for the alignment of numbers, and a proper typing if numbers with units:

\documentclass{article}
\usepackage{array, makecell, multirow}
\renewcommand{\theadfont}{\small\bfseries}
\usepackage{siunitx}

\begin{document}

 \begin{center}
\setlength{\extrarowheight}{2pt}
\sisetup{detect-weight, table-number-alignment=center}
 \begin{tabular}{|c|c|S[table-format=4.0]| S[table-format=2.2]|}%c|c|c|c|c|c|c|c|c|c|c|c|c|}
 \hline
 \thead{taxa de\\ amostragem} &\thead{duração da\\ amostra (ms)} & {\thead{tamanho\\ do bloco}} & {\thead{duração\\ do bloco (ms)}} \\
\hline
 \multirowthead{4} {\SI{44.1}{\kHz}} & \multirowcell{4}{ 0.0226} & 128 & 2.90 \\
 & & 256 & 5.80\\
 & & 512 & 11.60 \\
  & & 1024 & 23.21 \\
 \hline
 \multirowthead{4}{\SI{48}{\kHz}} & \multirowcell{4}{ 0.0208} & 128 & 2.66 \\
 & & 256 & 5.33 \\
 & & 512 & 10.66 \\
  & & 1024 & 21.33 \\
 \hline
 \multirowthead{4}{\SI{96}{\kHz}} & \multirowcell{4}{0.0104} & 128 & 1.33 \\
  & & 256 & 2.66 \\
   & & 512 & 5.33 \\
  & & 1024 & 10.66\\%128 & 256 & 512 & 1024 & 128 & 256 & 512 & 1024 \\
 \hline
 \multirowthead{4}{\SI{192}{\kHz}} & \multirowcell{4}{0.0052} & 128 & 0.66 \\
  & & 256 & 1.33 \\
   & & 512 & 2.66 \\
  & & 1024 & 5.33 \\%
 \hline
 \end{tabular}
 \end{center}

 \end{document}

enter image description here

Related Question