Does a matched filter give a gain in SNR? I am trying to know if filtering a sequence with a matched filters gives a gain equal to the sequence length, he are the calculus, is it correct ?

In my model $s$ is a deterministic complex sequence (lets say RRC pulse shape samples for a QAM modulation), $v$ is a complex white circular gaussian noise.

If it is correct does it mean that there is an "inband" filter which can enhance $SNR$ ?!

\begin{align}
s &amp;= [ s_0,\dots,s_{ N-1} ]^T\\
v &amp;= [ v_0,\dots,v_{ N-1} ]^T \\ 
x &amp;= s + v \\
R_v &amp;= \mathbb{ E } \left[ v v ^ H \right] = \sigma ^ 2 I \\
\textrm{SNR}_1 &amp;= \frac{ \mathbb{ E } \left[ \lvert s \rvert ^ 2   \right] } { \mathbb{ E } \left[ \lvert v \rvert ^ 2 \right] } = \frac{ \mathbb{ E } \left[ s ^ H s  \right] } { \mathbb{ E } \left[ v ^ H v \right]} = \frac{ s ^ H s } { \mathbb{ E } \left[ v ^ H v \right] }  = \frac{ s ^ H s } { \mathbb{ E } \left[ \Sigma \lvert v_i \rvert ^ 2 \right] } = \frac{ s ^ H s }{ N \sigma ^ 2 }\\
h &amp;= s \\
y &amp;= h ^ H x = h ^ H s + h ^ H v = s ^ H s + s ^ H v  \\
\textrm{SNR}_2 &amp;= \frac{ \mathbb{ E } \left[ \lvert h ^ H s \rvert ^ 2   \right] } { \mathbb{ E } \left[ \lvert h ^ H  v \rvert ^ 2 \right] } 
  = \frac{ h ^ H s s ^ H h }{ \mathbb{ E } \left[ h ^ H v v ^ H h  \right] } 
     = \frac{ h ^ H s s ^ H h }{ h ^ H R_v h } = \frac{ s ^ H s s ^ H s }{ s ^ H \sigma ^ 2 I s } = \frac{ s ^ H s }{ \sigma ^ 2 } \\
     \frac{\textrm{SNR}_2 }{ \textrm{SNR}_1 } &amp;= N
\end{align}
Output SNR for matched filter can be analysed in time domain, which is as explained below,

Consider a filter with Impulse response  $ \enspace h(t)$  and input $\,s(t)+w(t)$, where $\,s(t)$ represents the required signal and $\,w(t)$ represents AWGN noise. 

Output signal is given by  $$y(t) = s(t) * h(t) + w(t) * h(t) $$

Writing signal component of output in inverse fourier form   $$ y'(t) = \int_{-\infty}^{\infty}  S(f) H(f)  \ e^{j2pit}\ df $$ where $S(f)$ and $H(f)$ are spectrums of input signal $s(t)$ and Frequency response of filter. 

Output SNR of filter which is sampled at time instant $\,t=T $ is output power with signal component by noise power which can be return as 

$$SNR  =  \frac{\displaystyle\left |\int_{-\infty}^{\infty}  S(f) H(f)  \ e^{j2piT}\ df \right|^2}{ \displaystyle\left|\int_{-\infty}^{\infty}  \frac{N_o}{2} |H(f)|^2  df \right|^2}$$

Note that numerator term is evaluated at time t = T, which is the sampling instant for Matched filter. 

To maximise this SNR , we need to cancel the phase term . 
if we substitute $$H(f) = S^*(f)  e^{-j2pif} $$
which is nothing but $$h(t) = s^*(T-t) $$

and simplify the above SNR expression, we will get 
$$ SNR = \frac{\displaystyle\int_{-\infty}^{\infty} \left|S(f)\right|^2 df}{N_o/2} $$
which is nothing but ration of energy of signal $s(t)$ to value of power spectral density of AWGN noise. 

In this time domain analysis you can see that there is no filter effect , and it also tells us what should be the filter impulse response to maximise the output SNR.