function c = fatomfm2sym(x,pat)
% fatfm2sym.m - forward transform of wave atom frame with redundancy 2, symmetric version
%
% input:
%   x:    N-by-N array
%   pat:  type of frequency partition which satsifies parabolic scaling relationship
%         equal to 'p' or 'q'
%
% output:
%   y:    2N-by-N array containing all wave atom coefficients
%         the coefficients with b=1 are in the first half y(1:N,:), while
%         the coefficients with b=2 are in the second half y(N+1:2*N,:)
%
% Written by M.J. Fadili, 2007

c = double(fatomfm2sym_mex(single(x),pat));
%c1 = double(fatom2sym_mex(single(x),pat,[1 1]));
%c2 = double(fatom2sym_mex(single(x),pat,[-1 -1]));

%[m,n] = size(x);
%c = zeros(2*m,n);

%c(1:m,:)     = (c1+c2)/2;
%c(m+1:2*m,:) = (c1-c2)/2;
