# levels_test

levels_test, a MATLAB code which calls levels(), which draws a contour plot of a function, using sampling to determine the appropriate contour levels.

### Related Data and Programs:

levels, a MATLAB code which draws a contour plot of a function, using sampling to determine the appropriate contour levels.

### Source Code:

BEALE is the Beale function.

• beale_xy.m, defines the function in terms of X and Y.
• beale_xy.png, a PNG image created by
levels_xy ( @beale_xy, 50, [-5,5], [-5,5] )

BOHACH1 is the Bohachevsky function #1.

• bohach1_xy.m, defines the function in terms of X and Y.
• bohach1_xy.png, a PNG image created by
levels_xy ( @bohach1_xy, 50, [-0.75,0.75], [-0.75,+0.75] )

BOHACH2 is the Bohachevsky function #2.

• bohach2_xy.m, defines the function in terms of X and Y.
• bohach2_xy.png, a PNG image created by
levels_xy ( @bohach2_xy, 50, [-1,+1], [-1,+1] )

GOLDSTEIN_PRICE is the Goldstein-Price function.

LOCAL is a badly scaled function with a local minimum. The local minimum is at roughly X=(0.285,0.279) with F(X)=5.92 while the global minimum is at roughly X=(-21.02,-36.76) with F(X)=0. Because of the nature of this function, minimization algorithms may have a very hard time.

• local_xy.m, defines the function in terms of X and Y.
• local_xy.png, a PNG image created by
levels_xy ( @local_xy, 50, [-35,20], [-40,15] )

Last revised on 14 February 2019.