function w = bartlett(n)
%BARTLETT BARTLETT(N) returns the N-point Bartlett window.

%	Copyright (c) 1984-94 by The MathWorks, Inc.
%       $Revision: 1.4 $  $Date: 1994/01/25 17:58:37 $

w = 2*(0:(n-1)/2)/(n-1);
if rem(n,2)
	% It's an odd length sequence
	w = [w w((n-1)/2:-1:1)]';
else
	% It's even
	w = [w w(n/2:-1:1)]';
end

