I am trying to add a title above a table, without success. Here the code:
\begin{table}[b]
\centering
\begin{tabular}{|c|c|c|c|}
\cline{2-4}
\multicolumn{1}{c|}{}& &{CPU time}&\\
\cline{2-4}
\multicolumn{1}{c|}{} & Algorithm 1 & Algorithm 2 & Algorithm 3\\
\hline
$n=29$ & $0.001137$ & $0.000962$ & $0.000679$\\
\hline
$n=97$ & $0.020917$ & $0.008182$ & $0.005571$\\
\hline
$n=353$ & $0.699906$ & $0.067613$ & $0.054980$\\
\hline
$n=1345$ & $32.03852$ & $1.063334$ & $0.823744$\\
\hline
\end{tabular}
\caption{Caption}
\label{time}
\end{table}
How to have a better setting of title? Thanks!
What I would like to obtain is this:
\caption
just appears where you put it, so if you want it before the tabular rather than after, put it there.CPU time
in a cell of the table.CPU time
title, but presumably you don't like the way that it appears. It would help if you said how you wanted to add the title.