function [fk fk_ders] = fourier_kernel(frqs, N,fs)
R = size(frqs,2);
t = [-(N-1)/2:(N-1)/2]'/fs;

t_mat = repmat(t,[1,R]);
frq_mat = repmat(frqs,[N,1]);
fk = exp(1j .* t_mat .* frq_mat);
fk_ders = 1j * fk .* frq_mat;
end