function w = rectwin(n_est)
%MATLAB Code Generation Library Function

% Copyright 2008-2023 The MathWorks, Inc.
%#codegen 

narginchk(1,1)

if ~coder.internal.isConst(n_est)
    coder.internal.assert(coder.internal.isVariableSizingAllowed, 'signal:codegeneration:VarsizingRequiredForCodegen',mfilename);
end

[n,trivialwin] = check_order(n_est);

if trivialwin
    w = zeros(0,1);
    return
end

w = ones(n,1);

end
