You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pspm_bf_Fourier.m
    path of file: ./repos/PsPM/src/backroom
    
    the code of the file until where you have to start completion: function [bf, x] = pspm_bf_Fourier(varargin)

% SCR_BF_Fourier provides a sine/cosine set of basis functions with or without
%   Hanning window, of specified lenght and order
%
% FORMAT:
% [bf, x] = pspm_bf_Fourier(td, n, order, window) or 
%           pspm_bf_Fourier([td, n, order, window])
% with 
%   td: sampling interval in seconds 
%   n: window length in seconds (default: 30)
%   order: 1/2 * number of basis functions (default: 8)
%   window: Hanning window (default: 1)
% 
%__________________________________________________________________________
% PsPM 3.0
% (C) 2008-2015 Dominik R Bach (Wellcome Trust Centre for Neuroimaging)

% v001 drb 03.08.3012

% $Id$
% $Rev$


    
function [bf, x] = pspm_bf_Fourier(varargin)

% SCR_BF_Fourier provides a sine/cosine set of basis functions with or without
%   Hanning window, of specified lenght and order
%
% FORMAT:
% [bf, x] = pspm_bf_Fourier(td, n, order, window) or 
%           pspm_bf_Fourier([td, n, order, window])
% with 
%   td: sampling interval in seconds 
%   n: window length in seconds (default: 30)
%   order: 1/2 * number of basis functions (default: 8)
%   window: Hanning window (default: 1)
% 
%__________________________________________________________________________
% PsPM 3.0
% (C) 2008-2015 Dominik R Bach (Wellcome Trust Centre for Neuroimaging)

% v001 drb 03.08.3012

% $Id$
% $Rev$

% initialise
% -------------------------------------------------------------------------
global settings;
if isempty(settings), pspm_init; end