levels_test, a MATLAB program which calls levels() to draw a contour plot of a function, using sampling to determine the appropriate contour levels.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
levels, a MATLAB library which draws a contour plot of a function, using sampling to determine the appropriate contour levels.
BEALE is the Beale function.
levels_xy ( @beale_xy, 50, [-5,5], [-5,5] )
BOHACH1 is the Bohachevsky function #1.
levels_xy ( @bohach1_xy, 50, [-0.75,0.75], [-0.75,+0.75] )
BOHACH2 is the Bohachevsky function #2.
levels_xy ( @bohach2_xy, 50, [-1,+1], [-1,+1] )
GOLDSTEIN_PRICE is the Goldstein-Price function.
levels_xy ( @goldstein_price_xy, 50, [-5,+5], [-5,+5] )
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.
levels_xy ( @local_xy, 50, [-35,20], [-40,15] )