function y=absrel(n)

% This function computes the absorption coefficients appropriate
% to model thermoviscous absorption and relaxation effects.
%
% Translated into MATLAB by Ronald Kumon, 21 Oct 1995

% Declare global variables
global tv d omega b

% Compute absorption coefficients vector
relax =d*omega; 			% Relaxation coefficient
arelax=n.^2*relax.*(1-j*n*omega)./(1+(n*omega).^2); 		
 					% Relaxation absorption
y     = arelax; 			% Total absorption and dispersion
