function [min_val, max_val] = AttenuationG652(paramWavelength, paramType)

% calculate the fiber attenuation for the given wavelength using the
% approximation curves based on recent measurements from ITU-T publications

% paramType - defines the fibre type (A,B,C,D)
% paramWavelength - defines the target wavelength in nm [1260:1620]

% initial parameter values
max_val = -1;
min_val = -1;

% and the calculation process
if (strcmpi(paramType,'C') == 1 | strcmpi(paramType,'D') == 1)
   % C/D type fibre was selected - curves taken from Pete Anslow Excel
   % anslow_02_0307.xls to be published online at IEEE
   min_val = 1665.83816*(paramWavelength/1000)^6-14730.48652*(paramWavelength/1000)^5+54203.64404*(paramWavelength/1000)^4-106226.86668*(paramWavelength/1000)^3+116929.10988*(paramWavelength/1000)^2-68539.98456*paramWavelength/1000+16714.12368+0.005;
   max_val = 2128.42748*(paramWavelength/1000)^6-18654.31479*(paramWavelength/1000)^5+68042.65252*(paramWavelength/1000)^4-132203.97141*(paramWavelength/1000)^3+144300.34102*(paramWavelength/1000)^2-83889.61937*paramWavelength/1000+20293.51281;
elseif (strcmpi(paramType,'A') == 1 | strcmpi(paramType,'B') == 1)    
   % A/B type fibre was selected - curves taken from Pete Anslow Excel
   % anslow_02_0307.xls to be published online at IEEE
   if (paramWavelength > 1260)
       if (paramWavelength <= 1360)
           min_val = 59.375*(paramWavelength/1000)^3-230*(paramWavelength/1000)^2+295.861*paramWavelength/1000-125.999;
           max_val = 292.7083*(paramWavelength/1000)^3-1125*(paramWavelength/1000)^2+1439.8879*paramWavelength/1000-613.2575;
       elseif (paramWavelength > 1420)    
           min_val = 2.3291*(paramWavelength/1000)^2-7.4157*paramWavelength/1000+6.1057+0.005;
           max_val = 514.56309*(paramWavelength/1000)^4-3182.08679*(paramWavelength/1000)^3+7381.08328*(paramWavelength/1000)^2-7611.29567*paramWavelength/1000+2944.36519;
       end;
   end;    
else
    % unknown parameter was provided ...
    disp('Unknown fibre type - A ...D types allowed !!!');
    return;

end;    