The code is:
\begin{equation*}
\[I(t)=\begin{cases}
1; & |t|\le\frac{{\Delta}t_{p}^{FWHM}}{2}\\
0; & |t|>\frac{{\Delta}t_{p}^{FWHM}}{2}
\end{cases}\]
\end{equation*}\\
the error is missing $ inserted and bad math delimiter, what should I do for this?
I try to generate a table, the above codes are some equation in the table, the whole codes are attached below:
\begin{table}[!htb]
\begin{center}
\renewcommand{\arraystretch}{2.7}
\begin{tabular}{|c|c|}
\hline
\multicolumn{2}{|c|}{Square Pulse} \\
\hline
Pulse &
\begin{equation*}
\[I(t)=\begin{cases}
1; & |t|\le\frac{{\Delta}t_{p}^{FWHM}}{2}\\
0; & |t|>\frac{{\Delta}t_{p}^{FWHM}}{2}
\end{cases}\]
\end{equation*}\\
\hline
Autocorrelation &
\begin{equation*}
\[A^{(2)}(\tau)=\begin{cases}1-|\frac{\tau}{\Delta\tau_{A}^{FWHM}}|; &|\tau|\le\Delta\tau_{A}^{FWHM}\\
0; &|\tau|>\Delta\tau_{A}^{FWHM}\end{cases}\]
\end{equation*} \\
\hline
Relationship & ${\Delta}t_{p}^{FWHM}=\Delta\tau_{A}^{FWHM}$ \\
\hline
\multicolumn{2}{|c|}{Gaussian Pulse} \\
\hline
Pulse & $I(t)=exp[-(2\sqrt{ln2t}/{\Delta}t_{p}^{FWHM})^2]$ \\
\hline
Autocorrelation & $A^{(2)}(\tau)=exp[- (2\sqrt{ln2\tau}}/{\Delta\tau_{A}^{FWHM}})^2)^2$ \\
\hline
Relationship & $1.41{\Delta}t_{p}^{FWHM}=\Delta\tau_{A}^{FWHM}$ \\
\hline
\end{tabular}
\centering{
\caption{The relationship between the initial pulse and autocorrelation of square pulse and Gaussian pulse}
\label{table AC1}}
\end{center}
\end{table}
Best Answer
You shouldn't be using either
\begin{equation*} ... \end{equation*}
or\[ ... \]
inside the columns of atabular
environment. Instead, simply change the column definition of the right-hand column fromc
to>{$\displaystyle}c<{$}
; this will ensure that all cells in the second column will automatically be in math mode.You have several (syntax) errors in the equations. Also, write
\exp
and\ln
instead of justexp
andln
; that way, "exp" and "ln" will be typeset using upright letters.Also, where possible, avoid using fractional expressions using
\frac
in the second column; instead, using "inline-style" fractions, e.g.,a/b
instead of\frac{a}{b}
.Addendum: Your table contains lots of vertical and horizontal lines, which actually don't enhance the readability of its contents. You may want to give some thought to giving the table a more "open" look, e.g., by getting rid all vertical lines and most horizontal lines. I hope you will agree that the following table is much more "inviting" to the readers' eye (and brain...).