I want to create a table like this using Latex
---------------------------------
| sets |
---------------------------------
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---------------------------------------
| I1 | * | | * | * | | * | | * |
---------------------------------------
Here is what I wrote
\begin{table}
\caption{Multiprogram sets}
\label{multiprogram}
\begin{tabular}{| c | c | c | c | c | c | c | c | c |}
\cline{3-9}
\multicolumn{8}{}{} & Sets \\
\hline
\multicolumn{1}{}{} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\
\hline
astar & & * & & * & & & * & \\
\hline
\end{tabular}
\end{table}
But it doesn't work! The output look like
-----------------------------
sets |
---------------------------------------
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
---------------------------------------
| I1 | * | | * | * | | * | | * |
---------------------------------------
Any way to fix that?
\multicolumn{1}{c|}{} & \multicolumn{8}{c|}{Sets} \\