#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"
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}, @var{ier}, @var{nfun}, @var{err}] =} quad (@var{f}, @var{a}, @var{b}, @var{tol}, @var{sing})\n\ Integrate a nonlinear function of one variable using 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} and @var{ier}\n\ contains an integer error code (0 indicates a successful integration).\n\ The value of @var{nfun} indicates how many function evaluations were\n\ required, and @var{err} contains an estimate of the error in the\n\ solution.\n\ \n\ You can use the function @code{quad_options} to set optional\n\ parameters for @code{quad}.\n\ \n\ It should be noted that since @code{quad} is written in Fortran it\n\ cannot be called recursively.\n\ @end deftypefn") |
#define QUAD_ABORT | ( | ) |
Value:
do \ { \ if (fcn_name.length()) \ clear_function (fcn_name); \ unwind_protect::run_frame (uwp_frame); \ 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)
DEFUN_DLD | ( | quad | , | |
args | , | |||
nargout | ||||
) |