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

- 757,742
- 821
1 Answers
I suggest you
Use an
arrayrather than atabularenvironment as the main structure: Since all of the table's material (other than the header row) should be typeset in math mode, using atabularwouldn'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 anarrayenvironment must be in math mode.Load the
amsmathpackage (you may be already doing so) and use that package's\textmacro to render the material in the header row in an upright font shape.Use the
\vdotsmacro to create the symbols with the three vertical dotsUse the macros of the
booktabspackage 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.

\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}
- 506,678