%% Airy Function of Complex-Valued x
% Compute the Airy function at a slice through the complex plane at x + i.
% Take a slice through the complex plane.
%

x = -4:0.1:4;
z = x+1i;

% Calculate Ai(z).
%

w = airy(z);

% Plot the real part of the result.
%

figure
plot(x, real(w))
axis([-4 4 -1.5 1])
xlabel('real(z)')

% Copyright 2015 The MathWorks, Inc.