Matlab中Airy函数的零点

时间:2013-03-27 13:13:41

标签: matlab

是否有任何函数在Matlab中返回Airy函数的零点?

我正在使用Matlab 7.11.0。

谢谢!

1 个答案:

答案 0 :(得分:1)

您可以使用此功能:

function a = airyZeros(N)
#AIRYZEROS Computes the first N zeros of the Airy function
#
#    Example
#       >> airyZeros(3)
#       ans =
#          -2.3381   -4.0880   -5.5206

    a = NaN(1,N);

    for n = 1:N
        switch n
            case 1
                x = -2.3381;
            case 2
                x = -4.08795;
            case 3
                x = -5.52056;
            case 4
                x = -6.7867144;
            case 5
                x = -7.94413;
            case 6
                x = -9.02265;
            otherwise
                x = -(3*pi/2 * (n-0.25))^(2/3);
        end

        a(n) = real(fsolve(@airy, x, optimset('display','none')));

    end

end