EDU> diary dil8sess.txt EDU> help dilate dilate.m Script to bracket a minimum for a scalar function of one real variable. fname (in workspace) - string for function name aa (returned) - left end of bracketing interval bb (returned) - interior point of bracketing interval cc (returned) - right end of bracketing interval EDU> fname = 'cos' fname = cos EDU> dilate dilate: Table of intermediate results follows: xlo ylo xhi yhi xnew ynew 1.00e+000 5.40e-001 0.00e+000 1.00e+000 2.62e+000 -8.66e-001 2.62e+000 -8.66e-001 0.00e+000 1.00e+000 6.85e+000 8.41e-001 dilate: Finished; returning values aa=0, bb=2.618, cc=6.8541. EDU> fname = '-sin'; EDU> dilate dilate: Table of intermediate results follows: xlo ylo xhi yhi xnew ynew 1.00e+000 -8.41e-001 0.00e+000 0.00e+000 2.62e+000 -5.00e-001 dilate: Finished; returning values aa=0, bb=1, cc=2.618. EDU> fname = 'exp'; EDU> dilate dilate: Table of intermediate results follows: xlo ylo xhi yhi xnew ynew 0.00e+000 1.00e+000 1.00e+000 2.72e+000 -1.62e+000 1.98e-001 -1.62e+000 1.98e-001 1.00e+000 2.72e+000 -5.85e+000 2.87e-003 -5.85e+000 2.87e-003 1.00e+000 2.72e+000 -1.69e+001 4.38e-008 -1.69e+001 4.38e-008 1.00e+000 2.72e+000 -4.60e+001 1.08e-020 -4.60e+001 1.08e-020 1.00e+000 2.72e+000 -1.22e+002 1.05e-053 -1.22e+002 1.05e-053 1.00e+000 2.72e+000 -3.21e+002 3.92e-140 -3.21e+002 3.92e-140 1.00e+000 2.72e+000 -8.42e+002 0.00e+000 -8.42e+002 0.00e+000 1.00e+000 2.72e+000 -2.21e+003 0.00e+000 -2.21e+003 0.00e+000 1.00e+000 2.72e+000 -5.78e+003 0.00e+000 -5.78e+003 0.00e+000 1.00e+000 2.72e+000 -1.51e+004 0.00e+000 -1.51e+004 0.00e+000 1.00e+000 2.72e+000 -3.96e+004 0.00e+000 *** dilate: Function exp appears to be monotonic on the interval *** [-39602,1]: try rescaling the independent variable. dilate: Finished; returning values aa=-39602, bb=-15125.9999, cc=1. EDU> help dil8 [a,b,c]=dil8(fname) Function to bracket a minimum for a scalar function of one real variable. Inputs: fname = string containing the name of a function m-file Returns: a = left end of bracketing interval b = point interior to bracketing interval with low function value c = right end of bracketing interval EDU> [a,b,c] = dil8('exp') *** dil8: Function exp appears to be monotonic on the interval *** [-39602,1]: try rescaling the independent variable. a = -3.9602e+004 b = -1.5126e+004 c = 1 EDU> [a,b,c] = dil8('cos'); EDU> prtmtx([a,b,c]); 0.00e+000 2.62e+000 6.85e+000 EDU> diary off