function [f]=single_xcorr(w,gamma,amp,l,delta,time) % MATLAB HELP: % % function [f]=single_xcorr(w,gamma,amp,l,delta,time) % % computes the cross-correlation by summing normal modes % % inputs: % w, frequencies in 1/s % gamma, damping rates in 1/s % amp, the amplitude for each mode % l, angular degrees % delta, the distance in radians % time, the time grid to compute on % outputs: % f, the cross-correlation as a function of time % % see codes.ps or codes.pdf for more details % % aaron birch, may 21, 2002 % % allocate space for the result % f=zeros(size(time)); % % loop over modes, the factor 10^56 makes f of order 1, UGLY! % for (i=1:length(amp)) a=10^56*(2*l(i)+1)/(4*pi)*AsympLegendreP(l(i),delta); f=f+amp(i)*a*cos(w(i)*time).*exp(-gamma(i)*time)/4/gamma(i); end;