LaTex 表格单元格合并,一行对应多行

一,效果:

LaTex 表格单元格合并,一行对应多行_第1张图片

二,代码:

\begin{table*}
\centering
\caption{Experimental results on A, B, and C databases in terms of average MAE.}
\begin{tabular}{|c |c |c |c |c | c | c | c | c | c | c| c| c| c|}
\hline {Dataset} & {\diagbox{$\alpha$}{$\sigma_s$}} &{1} & {3} & {5} & {7} & {10} \\
\hline

\multirow{5}{*}{A} 
& {40} & {0.1703} & {0.1406} & {0.1447} & {0.1078} & {0.0585}   \\
\cline{2-7}
& {50} & {0.5006} & {0.5360} & {0.3602} & {0.5401} & {0.7303} \\
\cline{2-7}
& {60} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {70} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {80} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\hline

\multirow{5}{*}{B} 
& {40} & {0.1484} & {0.1406} & {0.1447} & {0.1078} & {0.0585}   \\
\cline{2-7}
& {50} & {0.5006} & {0.5360} & {0.3602} & {0.5401} & {0.7303} \\
\cline{2-7}
& {60} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {70} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {80} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\hline

\multirow{5}{*}{C} 
& {40} & {0.1484} & {0.1406} & {0.1447} & {0.1078} & {0.0585}   \\
\cline{2-7}
& {50} & {0.5006} & {0.5360} & {0.3602} & {0.5401} & {0.7303} \\
\cline{2-7}
& {60} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {70} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\cline{2-7}
& {80} & {0.7367} & {0.7494} & {0.8113} &{0.8429} &{0.9011} \\
\hline

\hline \end{tabular}
\label{tab}
\end{table*}

 注:用multirow后面紧跟的数字,要根据对应的行数,如上A对应5行,所以是大括号后面是5

你可能感兴趣的:(Latex)