SpectrumSmoothMarkov(y,window=3)
The probability of the change of the peak position from channel $i$ to the channel $i+1$ is : $$p_{i,i \pm 1}=A_i \sum_{k=1}^{m}exp \left( \frac{y(i \pm k)-y(i)}{y(i \pm k)+y(i)}\right)$$ where $A_i$ is the normalization constant so that: $$p_{i,i-1}+p_{i,i+1}=1$$
and $m$ is a width of smoothing window.