function samples_out = nyquist_filter(samples_in, Tb, N, beta)
    h = nyquist_filter_pulse(Tb, N, beta, N);
    samples_out = conv(samples_in, h);
  

% make pulse respone of Nyquist Filter
%    Tb - number of sumples on symbol
%    N  - total filter time in symbols
%    beta
function out = nyquist_filter_pulse(Tb, N, beta, K)
    out = zeros(Tb * K * 2, 1);

    i = 1 + (Tb * (K - N));        
    for t = linspace(-(Tb * N), (Tb * N), Tb * N * 2)
        omega = (cos((pi() / Tb) * beta * t)) / (1 - ((4 * beta ^ 2 * t ^2) / (Tb ^ 2)));
        out(i) = sinc(t * (pi() / Tb)) * omega;
        i = i + 1;
    end
