0
\begin{table}
\centering

\caption{\textcolor{green}{Evaluation of actual and predicted load }}
\label{tableFE}


\setlength{\tabcolsep}{0pt}
\begin{tabular}{\textwidth}{
  @{\extracolsep{\fill}}
  S[table-format=2.0]
  *{9}{S[table-format=1.2]} % 9, not 10
  @{}
}
\toprule
 & \multicolumn{9}{c}{forecast models} \\
\cmidrule{3-10}
{Hours} &
{Target (\si{\kilo\watt})} &
  \multicolumn{2}{c}{FCRBM} &
  \multicolumn{2}{c}{AFC-ANN} &
  \multicolumn{2}{c}{Bi-level} &
  \multicolumn{2}{c}{MI-ANN} \\
\cmidrule{3-4}\cmidrule{5-6}\cmidrule{7-8}\cmidrule{9-10}
 &                                                        % <---- this was missing
 & {P.load (\si{\kilo\watt})} & {MAPE (\%)}
 & {P.load (\si{\kilo\watt})} & {MAPE (\%)}
 & {P.load (\si{\kilo\watt})} & {MAPE (\%)}
 & {P.load (\si{\kilo\watt})} & {MAPE (\%)} \\
\midrule
22.00& 672.6923 & 676.0057 & 0.4926 & 681.0057 &1.2822 & 630.1417 & 6.3456 & 675.9192 & 0.4797\\ [1ex]


\bottomrule
\end{tabular}
\end{table}
  • Did you try with tabular* instead of tabular? Please also make your code a complete small example document by adding the documentclass as well as the relevant packages. Please also add if you get an error message and if so, which. – leandriis Aug 29 '19 at 5:15
1

You need tabular*, not tabular.

I also propose a few improvements, mainly moving the units on a new line and specifying carefully the number of digits.

\documentclass{cas-dc}
\usepackage{natbib,booktabs,siunitx}

\sisetup{detect-all}

\begin{document}

\begin{table}
\centering

\caption{Evaluation of actual and predicted load}
\label{tableFE}


\setlength{\tabcolsep}{0pt}
\begin{tabular*}{\textwidth}{
  @{\extracolsep{\fill}}
  S[table-format=2.2]
  S[table-format=3.4]
  S[table-format=3.4]
  S[table-format=1.4]
  S[table-format=3.4]
  S[table-format=1.4]
  S[table-format=3.4]
  S[table-format=1.4]
  S[table-format=3.4]
  S[table-format=1.4]
  @{}
}
\toprule
 & \multicolumn{9}{c}{forecast models} \\
\cmidrule{3-10}
{Hours} &
{\smash{\begin{tabular}[t]{c} Target \\ (\si{\kilo\watt}) \end{tabular}}} &
  \multicolumn{2}{c}{FCRBM} &
  \multicolumn{2}{c}{AFC-ANN} &
  \multicolumn{2}{c}{Bi-level} &
  \multicolumn{2}{c}{MI-ANN} \\
\cmidrule{3-4}\cmidrule{5-6}\cmidrule{7-8}\cmidrule{9-10}
 &
 & {P.load} & {MAPE}
 & {P.load} & {MAPE}
 & {P.load} & {MAPE}
 & {P.load} & {MAPE} \\
 &
 & {(\si{\kilo\watt})} & {(\%)}
 & {(\si{\kilo\watt})} & {(\%)}
 & {(\si{\kilo\watt})} & {(\%)}
 & {(\si{\kilo\watt})} & {(\%)} \\
\midrule
22.00& 672.6923 & 676.0057 & 0.4926 & 681.0057 &1.2822 & 630.1417 & 6.3456 & 675.9192 & 0.4797\\ [1ex]


\bottomrule
\end{tabular*}
\end{table}

\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.