|
Paul Skoczylas <pauls@cfertech.com> wrote in message <ee902dac-f320-44bf-ae32-e6d5cabf7713@glegroupsg2000goo.googlegroups.com>...
> .........
> For the integrand, I have defined the functions listed below. I believe there's nothing wrong with my integration routines, so for now, I'm just asking if I've misinterpreted the paper for the description of the integrand (or some similar mistake). The odd thing is that it seems to work pretty well for some values of tau and B, but is wildly out to lunch for others.
> ..........
> function H=Hankel1(a,x)
> H=besselj(a,x)+i*bessely(a,x);
>
> function a=arg(z);
> x=real(z);
> y=imag(z);
>
> if x>0 | y~=0;
> a=2*atan(y./(sqrt(x.^2+y.^2)+x));
> elseif x<0 & y==0;
> a=pi;
> elseif x==0 &y==0
> a=NaN;
> else;
> a=NaN;
> end;
> .........
- - - - - - - - - -
I will hazard the guess that your trouble lies in the meaning of the 'arg' function. As u advances from 0, the phase angle of J0(u)+i*Y0(u) begins at -pi/2 and moves through the fourth quadrant into the first, then the second, the third, back to the fourth, on to the first, and so forth, always winding around in a clockwise direction of increasing phase. Something similar occurs with u/B*(J1(u)+i*Y1(u)). If continuity is to be preserved, the phase of the sum of these must be a quantity that does not take the backward jumps that would keep it within the bounds -pi to pi, and therefore you cannot calculate it as you have done in your 'arg'. The statement in the paper that the psi(u) ~ u as u approaches infinity is a clue that this is actually the case.
You would need to define it in a very different manner perhaps using something like the 'unwrap' function to assist in this, though I am not quite sure offhand how you would do it in conjunction with your quadrature procedure.
(By the way, Matlab's 'atan2' function does just what your currently defined 'arg' does. However, as I say, the 'arg' you actually need would presumably have to be different from this.)
Roger Stafford
|