0

I want to create a table of the following form. Kindly helpenter image description here

3
  • 2
    Welcome to TeX.SX! What did you try so far and where exactly did you get stuck? For the column header "Evaluation criteria", you can use \muticolumnand for the entries in the first two columns, such as "CV", use \multirow(needs the multirow package).
    – leandriis
    Commented Jan 14, 2021 at 8:43
  • Have a look at tablesgenerator.com
    – NBur
    Commented Jan 14, 2021 at 8:47
  • Thank you. will have a look. I got stuck when multiple rows needs to be inserted in a single row. For example, Red, Green and Blue appears each time a new row starts. Commented Jan 15, 2021 at 16:34

1 Answer 1

2

You can use a combination of \multicolumn and \multirow. I left out the rightmost 6 columns because they are straightforward. And also the last 3 rows because they are similar to the 3 above. And I left out the boldface, just to make it simpler. If you add the other columns, change the \clines to \cline{...-10}.

So here is my solution:

\documentclass{standalone}
\usepackage{multirow}
\begin{document}

\renewcommand{\arraystretch}{1.5}
\begin{tabular}{|p{1cm}|p{1cm}|p{2.5cm}|p{2.5cm}|}
  \hline
  \multicolumn{2}{|p{2cm}|}{Evaluation criteria} & Multispectral Band & Proposed Method \\
  \hline
  \multirow{6}{*}{\(\chi^2\) test} & \multirow{3}{*}{CV} & Red & 2.18 \\
  \cline{3-4} 
  & & Green & 1.27 \\
  \cline{3-4} 
  & & Blue  & 0.44 \\
  \cline{2-4} 
  & \multirow{3}{*}{p-value} & Red  & 1.58e-33 \\
  \cline{3-4} 
  & & Green & 1.73e-40 \\
  \cline{3-4} 
  & & Blue & 2.39e-54 \\
  \hline
  \multicolumn{2}{|l|}{\multirow{3}{*}{R$^2$ test}} & Red & 0.90 \\
  \cline{3-4}
  \multicolumn{2}{|c|}{} & Green & 0.95 \\
  \cline{3-4}
  \multicolumn{2}{|c|}{} & Blue & 0.97 \\
  \hline
\end{tabular}

\end{document}

enter image description here

You must log in to answer this question.

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