home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / uniroot < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.4 KB  |  52 lines

  1.     
  2.     _O_n_e _D_i_m_e_n_s_i_o_n_a_l _R_o_o_t _F_i_n_d_i_n_g
  3.     
  4.          uniroot(f, interval, lower=min(interval),
  5.                  upper=max(interval),
  6.                      tol=.Machine$double.eps^0.25, ...)
  7.     
  8.     _A_r_g_u_m_e_n_t_s:
  9.     
  10.                f : the function for which the root is sought.
  11.     
  12.         interval : a vector containing the end-points of the
  13.                    interval to be searched for the root.
  14.     
  15.            lower : the lower end point of the interval to be
  16.                    searched.
  17.     
  18.            upper : the upper end point of the interval to be
  19.                    searched.
  20.     
  21.              tol : the desired accuracy.
  22.     
  23.     _D_e_s_c_r_i_p_t_i_o_n:
  24.     
  25.          The function optimize searches the interval from lower
  26.          to upper for a zero of the function f with respect to
  27.          its first argument.
  28.     
  29.          The function uses Fortran code (from Netlib) based on
  30.          algorithms given in the reference.
  31.     
  32.     _V_a_l_u_e:
  33.     
  34.          A list with components root and f.root which give the
  35.          location of the root and the value of the function
  36.          evaluated at that point.
  37.     
  38.     _R_e_f_e_r_e_n_c_e_s:
  39.     
  40.          Brent, R. (1973).  Algorithms for Minimization without
  41.          Derivatives.  Englewood Cliffs N.J.: Prentice-Hall.
  42.     
  43.     _S_e_e _A_l_s_o:
  44.     
  45.          optimize, nlm.
  46.     
  47.     _E_x_a_m_p_l_e_s:
  48.     
  49.          f <- function (x,a) x-a
  50.          xmin <- uniroot(f, c(0, 1), tol=0.0001, a=1/3)
  51.     
  52.