% iFMF.M   inverse Fourier Transformation of a matrix
% by XXL
% 
% inputs : A .... m x n Matrix with the non trivial data
%
%  output: the mxn matrix FSF with 
%           FSF = F_m * A * F'_n
%
% notes: fast version (01/03/2005)
%
% XXL .. Peter Balazs, contact: a8927259@unet.univie.ac.at
%
% Copyright :  (c) Acoustics Research Institute, Austrian Academy of
%              Science
%              http://www.kfs.oeaw.ac.at

function U = iFMF(A);

[n m] = size(A);

% (1) slow but instructive:
% F = fftu(eye(n));
% F1 = fftu(eye(m));
% UT = F'*A*F1;
%
% (2) fast
UT = fft(ifft(A).').';
UT = UT*(sqrt(n)/sqrt(m));
% to get unitary result!

indx = find(abs(UT)>10*eps);
U=zeros(m,n);
U(indx)=UT(indx);

