Navigation

Operators and Keywords

Function List:

C++ API

quad.cc File Reference

#include <string>
#include <iomanip>
#include <iostream>
#include "Quad.h"
#include "lo-mappers.h"
#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "pager.h"
#include "oct-obj.h"
#include "ov-fcn.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include "Quad-opts.cc"
Include dependency graph for quad.cc:

Defines

#define QUAD_ABORT()
#define QUAD_ABORT1(msg)
#define QUAD_ABORT2(fmt, arg)

Functions

double quad_user_function (double x)
float quad_float_user_function (float x)
 DEFUN_DLD (quad, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{v} =} quad (@var{f}, @var{a}, @var{b})\n\ @deftypefnx {Loadable Function} {@var{v} =} quad (@var{f}, @var{a}, @var{b}, @var{tol})\n\ @deftypefnx {Loadable Function} {@var{v} =} quad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing})\n\ @deftypefnx {Loadable Function} {[@var{v}, @var{ier}, @var{nfun}, @var{err}] =} quad (@dots{})\n\ Integrate a nonlinear function of one variable using @sc{quadpack}.\n\ The first argument is the name of the function, the function handle, or\n\ the inline function to call to compute the value of the integrand. It\n\ must have the form\n\ \n\ @example\n\ y = f (x)\n\ @end example\n\ \n\ @noindent\n\ where @var{y} and @var{x} are scalars.\n\ \n\ The second and third arguments are limits of integration. Either or\n\ both may be infinite.\n\ \n\ The optional argument @var{tol} is a vector that specifies the desired\n\ accuracy of the result. The first element of the vector is the desired\n\ absolute tolerance, and the second element is the desired relative\n\ tolerance. To choose a relative test only, set the absolute\n\ tolerance to zero. To choose an absolute test only, set the relative\n\ tolerance to zero.\n\ \n\ The optional argument @var{sing} is a vector of values at which the\n\ integrand is known to be singular.\n\ \n\ The result of the integration is returned in @var{v}. @var{ier}\n\ contains an integer error code (0 indicates a successful integration).\n\ @var{nfun} indicates the number of function evaluations that were\n\ made, and @var{err} contains an estimate of the error in the\n\ solution.\n\ \n\ The function @code{quad_options} can set other optional\n\ parameters for @code{quad}.\n\ \n\ Note: because @code{quad} is written in Fortran it\n\ cannot be called recursively.\n\ @seealso{quad_options, quadv, quadl, quadgk, quadcc, trapz, dblquad, triplequad}\n\ @end deftypefn")

Define Documentation

#define QUAD_ABORT (  ) 
Value:
do \
    { \
      if (fcn_name.length()) \
        clear_function (fcn_name); \
      return retval; \
    } \
  while (0)
#define QUAD_ABORT1 (   msg  ) 
Value:
do \
    { \
      ::error ("quad: " msg); \
      QUAD_ABORT (); \
    } \
  while (0)
#define QUAD_ABORT2 (   fmt,
  arg 
)
Value:
do \
    { \
      ::error ("quad: " fmt, arg); \
      QUAD_ABORT (); \
    } \
  while (0)

Function Documentation

DEFUN_DLD ( quad  ,
args  ,
nargout   
)
float quad_float_user_function ( float  x  ) 
double quad_user_function ( double  x  ) 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines