% Function to build an fft basis for use in filter learning work
%
% Usage:- V = fftmtx(N,n)
%
% where:-<in>
%        N = length of the non-sparse signal
%        n = length of th full signal
%
% Written by Simon Lucey

function V = fftmtx(N,varargin)

% Specify if possible
if nargin == 1
    n = (1:N)';
else
    n = vec(varargin{1});
end

V = [];
for k = 1:N
    vk = exp(-j*2*pi*(k - 1)*(n - 1)/N);
    V = [V,vk]; 
end
