1

Can anybody help me to create a table which is shown in the attached image? I have tried my own to build a table but I want as shown in the image not which I have attached table code.

Thank you very very much

\documentclass[DIV=12]{scrartcl}
\usepackage{array, caption, makecell}
\usepackage[table]{xcolor}
\setlength{\extrarowheight}{2pt}



\begin{document}


\begin{table}[hbt!]
\small
\centering
\captionabove{Analysis}
\begin{tabular}{|wc{3cm}|*{7}{wc{1cm}|}c|}
\hline
\diaghead{\hskip0.19\hsize}{\&  Output signal}{ feat}   & 
\multicolumn{7}{wc{8.1cm}|}{\begin{tabular}[t]{wc{1cm}|wc{1cm}|wc{1cm}|wc{1cm}|wc{1cm}|wc{1cm}|wc{1cm}}
\multicolumn{7}{wc{8.1cm}}{Standard deviation (std)}\\\hline
a & a & a& a& a& a& a\end{tabular}} &
\begin{tabular}{c}
Temperature 
\end{tabular} & 1 & 1&1& 1& 1& 1& 1\\\hline
\end{tabular}
\end{table} \label{ft}


\end{document}

enter image description here

maths
  • 139

1 Answers1

0

Here is a suggestion you can work with, probably you should consider using multirow to split the first cell. Since makecell has several \multirowcell commands, I use one of those.

Also, if you reduce the font size in row two, in will fit better. However, you have to abbreviate the headings (max. force etc).

I recommend to set this tabular using booktabs rules and no vertical lines, see example 2.

Example 1 – \hline

enter image description here

\documentclass[DIV=12]{scrartcl}
\usepackage{array, caption, makecell}
\usepackage[table]{xcolor}
\setlength{\extrarowheight}{2pt}



\begin{document}


\begin{table}[hbt!]
\small
\centering
\captionabove{Analysis\label{ft}}
\begin{tabular}{|c|*{7}{wc{1cm}|}}
\hline
Parameters of output&
\multicolumn{7}{c|}{Features}\\[1ex]
\cline{2-8}
& \makecell{max.\\ force} & \makecell{max.\\ accel.} &Peak &\makecell{Dom.\\ freq.} &444&777&CCCC \\
\hline
Temperature  & 1 & 1&1& 1& 1& 1& 1\\\hline
\end{tabular}
\end{table} 


\end{document}

Example 2 – booktabs

Here, I use booktabs rules, no vertical lines and makecell.

enter image description here

\documentclass[DIV=12]{scrartcl}
\usepackage{array, caption, makecell, booktabs, multirow}
\usepackage[table]{xcolor}
\setlength{\extrarowheight}{2pt}

\begin{document}

\begin{table}[hbt!]
\small
\centering
\captionabove{Analysis\label{tab:ft}}
\begin{tabular}{@{}l*{7}{wc{1cm}}}
\toprule
\multirowcell{3}{Parameters \\ of output}&
\multicolumn{7}{c}{Features}\\[1ex]
\cmidrule(l){2-8}
& \makecell{max.\\ force} & \makecell{max.\\ accel.} &Peak &\makecell{Dom.\\ freq.} &444&777&CCCC \\
\midrule
Temperature  & 1 & 1&1& 1& 1& 1& 1\\\bottomrule
\end{tabular}
\end{table} 

\end{document}
Sveinung
  • 20,355