I have a bunch of MATLAB results like this
0 -2.000000000000000 2.000000000000000
1.000000000000000 -1.926829268292683 3.707317073170731
2.000000000000000 0.716910656478955 -6.475399900458298
3.000000000000000 0.718921416773616 0.516843960338833
Here leftmost column is always 0,1,2,3,... so I have to get rid of those trailing zeros or to do row-numbering in LaTeX somehow.
However I want to convert all of them results to something like

But anything simple and informative would do. I generated the table above using MathType editor, so I'm not even sure what some of those commands mean
\begin{array}{*{20}{c}}
i&\vline& {{x_i}}&{{y_i}}\\
\hline
0&\vline& {{\rm{ - 2}}{\rm{.000000000000000}}}&{{\rm{2}}{\rm{.000000000000000}}}\\
1&\vline& {{\rm{ - 1}}{\rm{.926829268292683}}}&{{\rm{3}}{\rm{.707317073170731}}}\\
2&\vline& {{\rm{0}}{\rm{.716910656478955}}}&{{\rm{ - 6}}{\rm{.475399900458298}}}\\
3&\vline& {{\rm{0}}{\rm{.718921416773616}}}&{{\rm{0}}{\rm{.516843960338833}}}
\end{array}
What would you suggest?


collcellpacakge so that the first column was truncated to an integer value, and simplyralign the other two columns. – Peter Grill Feb 15 '13 at 22:03\rmis an argument-less switch not a one-argument-taking macro) and deprecated commands (again:\rmis old). You could typeset numbers very comfortable withsiunitx(in addition todatatooland/orpgfplotstable(which also has the PGF math macros and a conditional to check whether a number is an integer)).siunitxhas thezero-decimal-to-integeroption. – Qrrbrbirlbel Feb 15 '13 at 22:36