# How to represent this data as a table?

I am trying to put this in a table inside my LaTeX document. How can I get this? Ctrl-K does it here but not sure how to do it in LaTeX.

               Left      Right     Bottom        Top   Diagonal
Left      0.1303394  0.1084274  0.2158028  0.1050394 -0.2093420
Right     0.1084274  0.1632741  0.2841319  0.1299967 -0.2404701
Bottom    0.2158028  0.2841319  2.0868781  0.1645389 -1.0369962
Top       0.1050394  0.1299967  0.1645389  0.6447234 -0.5496148
Diagonal -0.2093420 -0.2404701 -1.0369962 -0.5496148  1.3277163

-
Do you want to display as code or as a properly-formatted table? –  Joseph Wright Sep 17 '12 at 18:43
Anything should help me.I need it the way I displayed it here. –  Vutukuri Sep 17 '12 at 18:47
This is mostly a default construction in LaTeX. Consider perusing Tables in LATEX2ε: Packages and Methods which highlights many possibilities. –  Werner Sep 17 '12 at 19:00

I would use the siunitx package for its ability to align numbers on their decimal points and display minus signs correctly and the booktabs package for its ability to draw well-spaced horizontal rules.

\documentclass{article}
\usepackage{siunitx,booktabs}
\sisetup{table-format=2.7, group-digits=false}
\begin{document}
\begin{table}
\centering
\caption{This is my table}
\begin{tabular}{@{} l *{5}{S} @{}} % use @{} to suppress space at ends of table
\toprule
& {Left} & {Right} & {Bottom} & {Top} & {Diagonal}\\ % center-set header entries
\midrule
Left    &  0.1303394  & 0.1084274 &  0.2158028 &  0.1050394 & -0.2093420\\
Right   &  0.1084274  & 0.1632741 &  0.2841319 &  0.1299967 & -0.2404701\\
Bottom  &  0.2158028  & 0.2841319 &  2.0868781 &  0.1645389 & -1.0369962\\
Top     &  0.1050394  & 0.1299967 &  0.1645389 &  0.6447234 & -0.5496148\\
Diagonal& -0.2093420  &-0.2404701 & -1.0369962 & -0.5496148 &  1.3277163\\
\bottomrule
\end{tabular}
\end{table}
\end{document}

-
\begin{table}[h]
\centering
\begin{tabular}{lrrrrr}
&      Left   &   Right  &   Bottom    &    Top  & Diagonal \\
\hline
Left     & 0.1303394 & 0.1084274 & 0.2158028 & 0.1050394 &-0.2093420 \\
Right    & 0.1084274 & 0.1632741 & 0.2841319 & 0.1299967 &-0.2404701 \\
Bottom   & 0.2158028 & 0.2841319 & 2.0868781 & 0.1645389 &-1.0369962 \\
Top      & 0.1050394 & 0.1299967 & 0.1645389 & 0.6447234 &-0.5496148 \\
Diagonal &-0.2093420 &-0.2404701 &-1.0369962 &-0.5496148 & 1.3277163
\end{tabular}
\end{table}

-
I'd be tempted to use the array package to switch to math mode (or dcolumns, rccol or siunitx), as the -` will otherwise be wrong :-( –  Joseph Wright Sep 17 '12 at 19:48
@JosephWright you think you understand something, and when you least expect, you learn something new! I never new quite how to align the numbers properly, and now I know! Cheers for that. –  Vivi Sep 17 '12 at 20:02