I am currently writing my master's thesis on LaTeX, and I keep getting problems each time I use the \begin{equation} syntax, this is what I'm using
\begin{equation}
DTW(X,Y)= \underset{w_x,w_y}{\text{min}}\sum_{k=1}^{K}d(x_{w_x}(k),y_{w_y}(k))
\end{equation}
and this is what I get
! Missing $ inserted
so far I have read that \begin{equation} already opens a math environment
Any help will be appreciated.