function tot=addFSAN(A,B);
%% ===========================================================================
%addFSAN - Add noise according to the FSAN model
%
% Parameter:    A	Noise source one
% Parameter:    B	Noise source two
% Returns:      tot	Resulting sum
%
% Example(s):
%   tmp_sum=addFSAN(tmp_sum,PSD_down.*xtalk);
%
% Algorithmic details:
%
% Reference:
%    FSAN noise combination method
%% ===========================================================================

%% ===========================================================================
% Copyright (C) 1998 by Telia Research AB, Lulea, Sweden; All rights reserved. 
% Project       : FSAN duplex model
% Author(s)     : Tomas Nordstrom (Tomas.Nordstrom@FTW.at)
%               : Daniel Bengtsson (Daniel.J.Bengtsson@Telia.se)
%
% CVS:       $Id: addFSAN.m,v 1.3 2000/03/10 13:45:59 tono Exp $
%% ===========================================================================
% Change History
%      1998-11-09 (DaB)  Created
%      1998-11-13 (ToNo) Added header and comments
%      1999-03-10 (DaB) Added possiblity to add matrix
%% ===========================================================================
if nargin<2,
   tot=sum(A.^(1/0.6),1).^0.6;
else
   tot=(A.^(1/0.6)+B.^(1/0.6)).^0.6;   
end