0
\begin{table}[htbp]
%\centering %% redundant
\begin{tabularx}{\linewidth}{ |l| *{5}{C|} }
\hline 
\textit{\textbf{Parameters}} & 
\textit{\textbf{Train (WOE)}} &
\textit{\textbf{Train (WRE)}} &
\textit{\textbf{G}} &
\textit{\textbf{B}} &
\textit{\textbf{W}}
\\ 
\hline
0.05\_0.025\_0.05\_0.2 & 42.72 & 44.89 & 677  & 76  & 497 \\ 
\hline
0.05\_0.05\_0.05\_0.1  & 48.55 & 55.19 & 440  & 67 & 569\\ 
\hline
0.05\_0.075\_0.05\_0.2 & 36.92 & 43.87 & 695 & 84 & 497\\ 
\hline
0.1\_0.05\_0.2\_0.2   & 38.09 & 53.03 & 436  & 112 & 486\\ 
\hline
0.2\_0.05\_0.05\_0     & 36.21 & 55.91 & 336 & 83 & 469\\ 
\hline
0.2\_0.05\_0.1\_0.05   & 43.12 & 60.67 & 243 & 127 & 447\\
\hline
Average & 40.93 & 52.26 & 471  & 87 & 495 \\
\hline
\end{tabularx}
\caption{Comparison of Avg. fitness values without information exchange and with  information exchange by random approach}
\label{tab:Comparison of Avg. fitness values without information exchange and with  information exchange W.R.T random approach}   
\end{table}

enter image description here

4
  • 1
    Columns can not be divided, you should insert new columns and merge cells, where you like to have one in place of two. In your case In column headers G, B, W. Please extend your code snippet to complete small but compilable document that people cane more easy to help you.
    – Zarko
    Nov 22, 2020 at 0:13
  • 1
    Welcome! I'm not sure what would be the meaning of the thick rules.
    – egreg
    Nov 22, 2020 at 0:44
  • i think he wants to split the G B H columns vertically / horizontally so that each column has two sub columns under it
    – js bibra
    Nov 22, 2020 at 2:01
  • Yes @ js bibra, i want to split g b and w equally Nov 22, 2020 at 11:03

2 Answers 2

2

I guess that the thick black rules are meant to show alignment.

For this you either manually pad the numeric entries to have three digits or use siunitx.

In this case it's not difficult to equalize the last five columns and to leave the surplus in the first column.

\documentclass{IEEEtran}
\usepackage{tabularx}
\usepackage{siunitx}

\begin{document}

\begin{table}[htbp]
\caption{Comparison of Avg.\ fitness values without information exchange 
  and with  information exchange by random approach}
\label{tab:ComparisonAvgfitness}

\begin{tabularx}{\linewidth}{
 |X|
 S[table-format=2.2] |
 S[table-format=2.2] |
 S[table-format=3.0] |
 S[table-format=3.0] |
 S[table-format=3.0] |
}
\hline 
\itshape\bfseries Parameters & 
{\itshape\bfseries Train} &
{\itshape\bfseries Train} &
{\itshape\bfseries G} &
{\itshape\bfseries B} &
{\itshape\bfseries W} \\
& 
{\itshape\bfseries (WOE)} &
{\itshape\bfseries (WRE)} & 
{\hphantom{11.11}} &
{\hphantom{11.11}} &
{\hphantom{11.11}} \\
\hline
0.05\_0.025\_0.05\_0.2 & 42.72 & 44.89 & 677  & 76  & 497 \\ 
\hline
0.05\_0.05\_0.05\_0.1  & 48.55 & 55.19 & 440  & 67 & 569\\ 
\hline
0.05\_0.075\_0.05\_0.2 & 36.92 & 43.87 & 695 & 84 & 497\\ 
\hline
0.1\_0.05\_0.2\_0.2   & 38.09 & 53.03 & 436  & 112 & 486\\ 
\hline
0.2\_0.05\_0.05\_0     & 36.21 & 55.91 & 336 & 83 & 469\\ 
\hline
0.2\_0.05\_0.1\_0.05   & 43.12 & 60.67 & 243 & 127 & 447\\
\hline
Average & 40.93 & 52.26 & 471  & 87 & 495 \\
\hline
\end{tabularx}
\end{table}

\end{document}

enter image description here

Note that the IEEE style (easily guessed from what you showed) wants table captions to sit above the table.

A different realization that you might find interesting.

\documentclass{IEEEtran}
\usepackage{siunitx,booktabs}

\sisetup{detect-all}

\begin{document}

\begin{table}[htbp]
\caption{Comparison of Avg.\ fitness values without information exchange 
  and with  information exchange by random approach}
\label{tab:ComparisonAvgfitness}

\begin{tabular*}{\linewidth}{
 @{\extracolsep{\fill}}
 l
 S[table-format=2.2]
 S[table-format=2.2]
 S[table-format=3.0]
 S[table-format=3.0]
 S[table-format=3.0]
 @{}
}
\toprule
\itshape\bfseries Parameters & 
{\itshape\bfseries Train} &
{\itshape\bfseries Train} &
{\itshape\bfseries G} &
{\itshape\bfseries B} &
{\itshape\bfseries W} \\
& 
{\itshape\bfseries (WOE)} &
{\itshape\bfseries (WRE)} \\
\midrule
0.05\_0.025\_0.05\_0.2 & 42.72 & 44.89 & 677  & 76  & 497 \\ 
0.05\_0.05\_0.05\_0.1  & 48.55 & 55.19 & 440  & 67 & 569\\ 
0.05\_0.075\_0.05\_0.2 & 36.92 & 43.87 & 695 & 84 & 497\\ 
0.1\_0.05\_0.2\_0.2   & 38.09 & 53.03 & 436  & 112 & 486\\ 
0.2\_0.05\_0.05\_0     & 36.21 & 55.91 & 336 & 83 & 469\\ 
0.2\_0.05\_0.1\_0.05   & 43.12 & 60.67 & 243 & 127 & 447\\
\midrule
Average & 40.93 & 52.26 & 471  & 87 & 495 \\
\bottomrule
\end{tabular*}
\end{table}

\end{document}

enter image description here

2

You not provided any information, about width of new columns, so I guessing that you look for something like this:

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}


\begin{document}
    \begin{table}[htbp]
\begin{tabularx}{\linewidth}{ |l| *{2}{C|}*{3}{C|c|} }
    \hline
\multirow{2}{*}{\textit{\textbf{Parameters}}} 
    &   \textit{\textbf{Train}} 
        &   \textit{\textbf{Train}} 
            &   \multicolumn{2}{c|}{\textit{\textbf{G}}} 
                    &   \multicolumn{2}{c|}{\textit{\textbf{B}}}
                            &   \multicolumn{2}{c|}{\textit{\textbf{W}}}    \\
    \cline{4-9}
    &   \textit{\textbf{(WOE)}}
        &   \textit{\textbf{(WRE)}}
            &   &   &   &   &   &                                           \\
    \hline
0.05\_0.025\_0.05\_0.2 & 42.72 & 44.89 & 677 & & 76 & & 497 &               \\
    \hline
0.05\_0.05\_0.05\_0.1  & 48.55 & 55.19 & 440 & & 67 & & 569 &               \\
    \hline
\end{tabularx}
\caption{Comparison of Avg. fitness values without information exchange and with  information exchange by random approach}
\label{tab:Comparison of Avg. fitness values without information exchange and with  information exchange W.R.T random approach}
    \end{table}
\end{document}

or

enter image description here

for which you only need to change column headers:

...
\multirow{2}{*}{\textit{\textbf{Parameters}}} 
    &   \multicolumn{2}{c|}{\textit{\textbf{Train}}}
            &   \multicolumn{2}{c|}{\textit{\textbf{G}}} 
                    &   \multicolumn{2}{c|}{\textit{\textbf{B}}}
                            &   \multicolumn{2}{c|}{\textit{\textbf{W}}}    \\
...

Addendum: To have all columns (except the first) of the equal width, you need to specify this columns as C column type. Since by this table become quite wider, you need to reduce font size used in table and also reduce \tabcolsep. For better looking of table is advisable to increase \arrraystreatch table:

enter image description here

\documentclass{article}
\usepackage{geometry}
\usepackage{multirow, tabularx}
\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{document}
    \begin{table}[htbp]
    \small  % <---
    \setlength\tabcolsep{4pt}% <--- default is 6pt
    \renewcommand\arraystretch{1.2}% <---
\begin{tabularx}{\linewidth}{ |l| *{8}{C|}}
    \hline
\multirow{2}{*}{\textit{\textbf{Parameters}}}
    &   \textit{\textbf{Train}}
        &   \textit{\textbf{Train}}
            &   \multicolumn{2}{c|}{\textit{\textbf{G}}}
                    &   \multicolumn{2}{c|}{\textit{\textbf{B}}}
                            &   \multicolumn{2}{c|}{\textit{\textbf{W}}}    \\
    \cline{4-9}
    &   \textit{\textbf{(WOE)}}
        &   \textit{\textbf{(WRE)}}
            &   &   &   &   &   &                                           \\
    \hline
0.05\_0.025\_0.05\_0.2 & 42.72 & 44.89 & 677 & & 76 & & 497 &               \\
    \hline
0.05\_0.05\_0.05\_0.1  & 48.55 & 55.19 & 440 & & 67 & & 569 &               \\
    \hline
\end{tabularx}
\caption{Comparison of Avg. fitness values without information exchange and with  information exchange by random approach}
\label{tab:Comparison of Avg. fitness values without information exchange and with  information exchange W.R.T random approach}
    \end{table}
\end{document}
2
  • the G B and W must have sub-columns as you have added but they should be of equal width, the first one you have plotted looks perfect but i need it to be of equal width. Nov 22, 2020 at 11:02
  • @MohammedNadeem, than you only need to replace c with C, or shortly \begin{tabularx}{\linewidth}{ |l| *{8}{C|} }. See addendum to answer.
    – Zarko
    Nov 22, 2020 at 11:06

You must log in to answer this question.

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