format long 
format compact

% Visual inspection of the function
x = -10:.1:0;
y = airy(x);
plot(x,y);
grid on
hold on

% by inspection, location of the first zero: between -3 and -1
left = -3;
right = -1;

[z1b, k1b,~] = mybisect(@airy, left, right)
[z1s, k1s,~] = mysecant(@airy, left, right)
[z1d, k1d,~] = dekker(@airy, left, right)

% mark the location
plot(z1b, airy(z1b), 'ro')

% by inspection, location of the second zero: between -5 and -3
left = -5;
right = -3;

[z2b, k2b,~] = mybisect(@airy, left, right)
[z2s, k2s,~] = mysecant(@airy, left, right)
[z2d, k2d,~] = dekker(@airy, left, right)

% mark the location
plot(z2b, airy(z2b), 'ro')

hold off