function w = cosinewindow(varargin)
%COSINEWINDOW   generalised cosine window.
%   COSINEWINDOW(N, SFLAG, [A0 A1 A2 A3]) returns the N-point 
%   cosine window with specified coefficients in a column vector. 
%   No defaults are used, and all parameters must be specified.
%   SFLAG may be either 'symmetric' or 'periodic'.
%   The coefficients for some common windows are
%
%   Hann                       [0.5     0.5     0       0]
%   Hamming                    [0.54    0.46    0       0]
%   Exact Blackman             [7938    9240    1430    0] / 18608
%   Blackman                   [0.42    0.50    0.08    0]
%   Min 3-term Blackman-Harris [0.42323 0.49755 0.07922 0]
%   Min 4-term Blackman-Harris [0.35875 0.48829 0.14128 0.01168]
%  
%   See also BARTLETT, BLACKMAN, BOXCAR, CHEBWIN, HAMMING, HANN, 
%   KAISER and TRIANG.

%   Copyright 1988-2000 The MathWorks, Inc.
%       $Revision: 1.7 $  $Date: 2000/06/09 22:03:34 $

% Amended from BLACKMAN.M, 16th June 2002, David Gibson

% Check number of inputs
error(nargchk(3,3,nargin));

[w,msg] = gencoswin('cosinewindow',varargin{:});
error(msg);

% [EOF] blackman.m
