function [xnu,L] = louvl(S,nu) % Routine to use Liouville operator matrix to generate % absorption coefficient for molecular lines. To be used % for overlapping line problem eventually. Line profiles % are Lorentzian. S = vector of line strengths, % nu = vector of line center wavenumbers. % To use: [xnu,L] = louvl(S,nu); % by D. Holmgren, Aug 1 95 % Checked out with Sun Matlab. xlo = input('Lower wavenumber limit: '); xhi = input('Upper wavenumber limit: '); np = input('Number of points: '); xnu = linspace(xlo,xhi,np)'; S1 = diag(S); L = zeros(np,1); for k = 1:np L(k) = -imag( trace( S1*inv( diag( xnu(k)-nu+0.1*i ) ) ) )/pi; end plot(xnu,L) xlabel('Wavenumber (cm-1)') ylabel('L(nu)') title('Absorption coefficient spectrum') %shg