function [ Yp ] = fourier_derivative( Y, dx )
%FOURIER_DERIVATIVE compute fourier space derivative of fourier space
%vector Y
n = length(Y);
kx = linspace(-n/2+1,n/2,n).*((2*pi*1i/n)/dx);
kx = circshift(kx, -(n/2-1));
Yp = Y.*kx;

end

