function u = cosine_window(N,fsmp)
  % Returns a cosine window of total width {N}.
  u = ones(N,1);
  for k = 1:N
    v = 0.5*(1 - cos(2*pi*(k-1)/N));
    u(k,1) = v;
  end
  % figure 31; timeplot(u,1,N,fsmp,'');   title('cosine window')