So I'm trying to draw the following in Latex but I'm having trouble, I tried the following but no good:
\begin{tikzpicture}
\draw[latex-latex] (-3.5,0) -- (3.5,0) ; %edit here for the axis
\foreach \x in {-3,-2,-1,0,1,2,3} % edit here for the vertical lines
\draw[shift={(\x,0)},color=black] (0pt,3pt) -- (0pt,-3pt);
\foreach \x in {x_{1/2},x_{3/2},...,x_{i-1/2},x_{i+1/2},...,x_{N+1/2}} % edit here for the numbers
\draw[shift={(\x,0)},color=black] (0pt,0pt) -- (0pt,-3pt) node[below]
{$\x$};
\end{tikzpicture}

