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: spm_dftmtx.m
    path of file: ./repos/spm12
    
    the code of the file until where you have to start completion: function C = spm_dftmtx(N,K,a)
% Creates basis functions for Discrete Cosine Transform.
% FORMAT C = spm_dftmtx(N,K,a)
%
% N - dimension
% K - order
% a - number of (1/2)5Hz frequency steps (default a = 2)
%__________________________________________________________________________
% spm_dftmtx creates a matrix for the first few basis functions of a one
% dimensional discrete Fourier transform.
%
% See:    Fundamentals of Digital Image Processing (p 150-154).
%         Anil K. Jain 1989.

    
function C = spm_dftmtx(N,K,a)
% Creates basis functions for Discrete Cosine Transform.
% FORMAT C = spm_dftmtx(N,K,a)
%
% N - dimension
% K - order
% a - number of (1/2)5Hz frequency steps (default a = 2)
%__________________________________________________________________________
% spm_dftmtx creates a matrix for the first few basis functions of a one
% dimensional discrete Fourier transform.
%
% See:    Fundamentals of Digital Image Processing (p 150-154).
%         Anil K. Jain 1989.
%__________________________________________________________________________
% Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
 
% Karl Friston
% $Id: spm_dftmtx.m 4170 2011-01-24 18:37:42Z karl $
 
 
% initialise
%--------------------------------------------------------------------------
try, a; catch, a = 2; end