%------------------------------------------------------------------------ % Written by: % -- % John L. Weatherwax 2007-04-22 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %------------------------------------------------------------------------ % Constants. F_NUMBERS = [ 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 ... 1597 2584 4181 6765 10946 17711 28657 46368 75025 ... 121393 196418 317811 514229 832040 1346269 2178309 ... 3524578 5702887 9227465 14930352 ]; n=10; % Functions: % f=inline( 'x.*x' ); % f=inline( '(x-55).*(x-55 )' ); f=inline( '-(x-27.5).^2' ); % F_NUMBERS( n ) xArray = 1:F_NUMBERS( n )-1; figure; plot( xArray, f( xArray ), '-o' ); [ iMax, fMax ] = eLattice( xArray, f )