3

I would like to draw such a table in latex with some mathematical formula. Could you please help me to do this? enter image description here

David Carlisle
  • 757,742
Kaja
  • 821

1 Answers1

5

I suggest you

  • Use an array rather than a tabular environment as the main structure: Since all of the table's material (other than the header row) should be typeset in math mode, using a tabular wouldn't be convenient as you'd have to enter lots and lots of $ symbols (one pair for each cell) to enter and exit math mode. Note that an array environment must be in math mode.

  • Load the amsmath package (you may be already doing so) and use that package's \text macro to render the material in the header row in an upright font shape.

  • Use the \vdots macro to create the symbols with the three vertical dots

  • Use the macros of the booktabs package to obtain well-spaced horizontal lines.

Here's a starter template for the table; I'll leave it to you to fill in the missing cells.

enter image description here

\documentclass{article}
\usepackage{amsmath,caption,booktabs}
\begin{document}
\begin{table}
\centering
$\begin{array}{ ccccc }
\toprule
\text{harmonic} & \text{period} & \text{frequency} & \text{frequency} & \text{contribution}\\
& & (\text{cycle/samp.~int.}) & (\text{rad/samp.~int.}) & \text{to variance}\\
\midrule
1 & n & 1/n & 2\pi/n & \frac{1}{2}A_1^2\\
2 & & & & \\
3 & & & & \\
\vdots & & & & \\
n/2-1 & & & & \\
n/2 & & & & \\
\bottomrule
\end{array}$
\end{table}
\end{document} 
Mico
  • 506,678