5

I would like to create a payoff matrix that looks like this:

enter image description here

With the following code:

\begin{align*}
\begin{tabular}{cc|c|c|}
& \multicolumn{1}{c}{} & \multicolumn{2}{c}{Suspect 2} \\\cline{3-4}
& {} &{Quiet}  &{Fink}  \\\cline{2-4} 
&{Quiet} & {4,4} & {0,6}  \\ \cline{2-4}
Suspect 1  &{Fink} & {6,0} & {2,2}  \\\cline{2-4}
\end{tabular}
\end{align*}

I've got it looking like this:

enter image description here

Help very much appreciated!

6

enter image description here

\documentclass[12pt]{article}
\usepackage{multirow}
\newcommand\ml[1]{\multicolumn{1}{|l|}{#1}}
\newcommand\mcc[1]{\multicolumn{2}{c}{#1}}

\begin{document}
    \begin{center}
    \renewcommand\arraystretch{1.3}
\begin{tabular}{lc|c|c|}
\mcc{}          &   \mcc{Suspect 2}         \\
    \cline{3-4}
    &           &   Quiet   &   Fink        \\
    \cline{2-4}
\multirow{2}{*}{Suspect 1}
    &   \ml{Quiet}  &   4,4     &   0,6     \\
    \cline{2-4}
    &   \ml{Fink}   &   6,0     &   2,2     \\
    \cline{2-4}
\end{tabular}
    \end{center}
\end{document}

edit: as suggested CarLaTeX in her comment below, table is now stretched by factor 1.3.

  • Already awake? You were faster that me! I was just posting the same answer, the only difference is I would add \renewcommand*{\arraystretch}{1.2} :) – CarLaTeX Oct 23 '17 at 2:41
  • Works like a charm - learned a few new tricks in the process! – Thevesh Theva Oct 23 '17 at 2:45
  • 1
    @CarLaTeX, still awake ... :-(, so i'm bit tiered and forgot to suggest table more "open" ... – Zarko Oct 23 '17 at 2:45
  • 1
    Still awake?! You should go to sleep, then! Good night :):):) – CarLaTeX Oct 23 '17 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.