How to write this mathematical formulas into latex

605 Views Asked by At

I want to change this formula into Latex code: enter image description here

the latex code generated by MathType is below:

\[\widetilde v(i) = \frac{{\sum\nolimits_{j \in {N_i}(D)} {w(i,j)v(j)} }}{{\sum\nolimits_{j \in {N_i}(D)} {w(i,j)} }}\]

but when i insert this code into vim-latex, somes errors happens, so that vim-latex cannot accept it:

mypaper.tex|559 error| LaTeX Error: Bad math environment delimiter.
mypaper.tex|559 error| Missing delimiter (. inserted). \endgroup  \[\widetilde v(i) = \frac\left\{ \sum\nolimits_{j \in {N_i}(D)} {w(i,j...
mypaper.tex|559 error| Missing \right. inserted. \right . \[\widetilde v(i) = \frac\left\{ \sum\nolimits_{j \in {N_i}(D)} {w(i,j...
mypaper.tex|559 error| Extra }, or forgotten $. ...\nolimits_{j \in {N_i}(D)} {w(i,j)v(j)} } }\left\{ \sum\nolimits_{j ...
mypaper.tex|559 error| Extra }, or forgotten $. ...nolimits_{j \in {N_i}(D)} {w(i,j)v(j)} }} \left\{ \sum\nolimits_{j \...
mypaper.tex|559 error| Extra }, or forgotten \right. ...\sum\nolimits_{j \in {N_i}(D)} {w(i,j)} } }\] \right\}<++> \right\}<++>
mypaper.tex|559 error| Extra }, or forgotten \right. ...sum\nolimits_{j \in {N_i}(D)} {w(i,j)} }} \] \right\}<++> \right\}<++>
mypaper.tex|559 error| LaTeX Error: Bad math environment delimiter.
mypaper.tex|559 error| Extra \right. ...}(D)} {w(i,j)} }}\] \right\}<++> \right\} <++>

How to solve this problem ?

3

There are 3 best solutions below

0
On BEST ANSWER

I use the follow code to solve this problem:

\widetilde v(i) = \frac{ \sum\nolimits_{j \in {N_i}(D)} {w(i,j)v(j)} }{ \sum\nolimits_{j \in {N_i}(D)} {w(i,j)}}
1
On

Surround your math code with $$ signs.

For example:

$$ sin^2(\theta) +cos^2(\theta) = 1 $$

will produce your desired equation.

3
On
   \begin{document}

   \begin{equation}
   \tilde{v}(\it {i})=\frac{\Sigma_{j\epsilon N_iD}    
    W(\it{i,j})v(\it{j})}{{\Sigma_{j\epsilon N_iD} W(\it{i,j})}}
    \end{equation}
     \end{document}

This seem to work.