I would like to write above equation in my document. But I am getting Missing { error. Please help me with this code.
\begin{equation}
\vec{X}(t+1)={\vec{D}^'\.$e^{bl}$\.\cos(2$\pi$l)+\vec{X}^*(t)}
\end{equation}
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communitySo, you have several problems with your code:
^'
while the simple '
is sufficient\.
instead of \cdot
$
inside of an equation (which is unnecessary)Here is an example
\documentclass{article}
\usepackage{amsmath}
\usepackage{lmodern}
\begin{document}
\begin{equation}
\vec{X}(t+1)=\vec{D'}\cdot e^{bl}\cdot \cos(2\pi l)+\vec{X^{*}}(t)
\end{equation}
\end{document}
which produces
If you want longer arrows you could use \renewcommand{\vec}{\overrightarrow}
\documentclass{article}
\usepackage{amsmath}
\usepackage{lmodern}
\renewcommand{\vec}{\overrightarrow}
\begin{document}
\begin{equation}
\vec{X}(t+1)=\vec{D'}\cdot e^{bl}\cdot \cos(2\pi l)+\vec{X^{*}}(t)
\end{equation}
\end{document}
I would suggest \vv
from the esvect
package. It has 8
arrow tips ( from a
to h
, which do not touch capital letters, and are extensible. Here are some examples:
\documentclass{article}
\usepackage{amsmath}
\usepackage{lmodern}
\usepackage[b]{esvect}
\renewcommand{\vec}{\overrightarrow}
\begin{document}
\begin{equation}
\vec{X}(t+1)=\vec{D'}\cdot e^{bl}\cdot \cos(2\pi l)+\vec{X^{*}}(t)
\end{equation}
\begin{equation}
\vv{X}(t+1)=\vv{D'}\cdot e^{bl}\cdot \cos(2\pi l)+\vv{X^{*}}(t)
\end{equation}
\end{document}