function w_hat = proj_hat(u_hat)
% PROJ_HAT projects onto positive wavenumbers
n = length(u_hat);
w_hat = [0 u_hat(2:(n/2)) 0.5*u_hat(n/2+1) zeros(1,(n/2-1))]; 
end

