#include "lo-specfun.h"
#include "quit.h"
#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "utils.h"
Go to the source code of this file.
Defines | |
#define | DO_BESSEL(type, alpha, x, scaled, ierr, result) |
Enumerations | |
enum | bessel_type { BESSEL_J, BESSEL_Y, BESSEL_I, BESSEL_K, BESSEL_H1, BESSEL_H2 } |
Functions | |
DEFUN_DLD (besselj, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{j}, @var{ierr}] =} besselj (@var{alpha}, @var{x}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt})\n\ @deftypefnx {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt})\n\ Compute Bessel or Hankel functions of various kinds:\n\ \n\ @table @code\n\ @item besselj\n\ Bessel functions of the first kind. If the argument @var{opt} is supplied,\n\ the result is multiplied by @code{exp(-abs(imag(@var{x})))}.\n\ \n\ @item bessely\n\ Bessel functions of the second kind. If the argument @var{opt} is supplied,\n\ the result is multiplied by @code{exp(-abs(imag(@var{x})))}.\n\ \n\ @item besseli\n\ \n\ Modified Bessel functions of the first kind. If the argument @var{opt} is\n\ supplied, the result is multiplied by @code{exp(-abs(real(@var{x})))}.\n\ \n\ @item besselk\n\ \n\ Modified Bessel functions of the second kind. If the argument @var{opt} is\n\ supplied, the result is multiplied by @code{exp(@var{x})}.\n\ \n\ @item besselh\n\ Compute Hankel functions of the first (@var{k} = 1) or second (@var{k}\n\ = 2) kind. If the argument @var{opt} is supplied, the result is multiplied\n\ by @code{exp (-I*@var{x})} for @var{k} = 1 or @code{exp (I*@var{x})} for\n\ @var{k} = 2.\n\ @end table\n\ \n\ If @var{alpha} is a scalar, the result is the same size as @var{x}.\n\ If @var{x} is a scalar, the result is the same size as @var{alpha}.\n\ If @var{alpha} is a row vector and @var{x} is a column vector, the\n\ result is a matrix with @code{length (@var{x})} rows and\n\ @code{length (@var{alpha})} columns. Otherwise, @var{alpha} and\n\ @var{x} must conform and the result will be the same size.\n\ \n\ The value of @var{alpha} must be real. The value of @var{x} may be\n\ complex.\n\ \n\ If requested, @var{ierr} contains the following status information\n\ and is the same size as the result.\n\ \n\ @enumerate 0\n\ @item\n\ Normal return.\n\ \n\ @item\n\ Input error, return @code{NaN}.\n\ \n\ @item\n\ Overflow, return @code{Inf}.\n\ \n\ @item\n\ Loss of significance by argument reduction results in less than\n\ half of machine accuracy.\n\ \n\ @item\n\ Complete loss of significance by argument reduction, return @code{NaN}.\n\ \n\ @item\n\ Error---no computation, algorithm termination condition not met,\n\ return @code{NaN}.\n\ @end enumerate\n\ @end deftypefn") | |
DEFUN_DLD (bessely, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{y}, @var{ierr}] =} bessely (@var{alpha}, @var{x}, @var{opt})\n\ See besselj.\n\ @end deftypefn") | |
DEFUN_DLD (besselh, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{h}, @var{ierr}] =} besselh (@var{alpha}, @var{k}, @var{x}, @var{opt})\n\ See besselj.\n\ @end deftypefn") | |
DEFUN_DLD (airy, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{a}, @var{ierr}] =} airy (@var{k}, @var{z}, @var{opt})\n\ Compute Airy functions of the first and second kind, and their\n\ derivatives.\n\ \n\ @example\n\ @group\n\ K Function Scale factor (if 'opt' is supplied)\n\ --- -------- ---------------------------------------\n\ 0 Ai (Z) exp ((2/3) * Z * sqrt (Z))\n\ 1 dAi(Z)/dZ exp ((2/3) * Z * sqrt (Z))\n\ 2 Bi (Z) exp (-abs (real ((2/3) * Z *sqrt (Z))))\n\ 3 dBi(Z)/dZ exp (-abs (real ((2/3) * Z *sqrt (Z))))\n\ @end group\n\ @end example\n\ \n\ The function call @code{airy (@var{z})} is equivalent to\n\ @code{airy (0, @var{z})}.\n\ \n\ The result is the same size as @var{z}.\n\ \n\ If requested, @var{ierr} contains the following status information and\n\ is the same size as the result.\n\ \n\ @enumerate 0\n\ @item\n\ Normal return.\n\ \n\ @item\n\ Input error, return @code{NaN}.\n\ \n\ @item\n\ Overflow, return @code{Inf}.\n\ \n\ @item\n\ Loss of significance by argument reduction results in less than half\n\ of machine accuracy.\n\ \n\ @item\n\ Complete loss of significance by argument reduction, return @code{NaN}.\n\ \n\ @item\n\ Error---no computation, algorithm termination condition not met,\n\ return @code{NaN}.\n\ @end enumerate\n\ @end deftypefn") | |
DEFUN_DLD (besseli, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{i}, @var{ierr}] =} besseli (@var{alpha}, @var{x}, @var{opt})\n\ See besselj.\n\ @end deftypefn") | |
DEFUN_DLD (besselk, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {[@var{k}, @var{ierr}] =} besselk (@var{alpha}, @var{x}, @var{opt})\n\ See besselj.\n\ @end deftypefn") | |
octave_value_list | do_bessel (enum bessel_type type, const char *fn, const octave_value_list &args, int nargout) |
static void | gripe_bessel_arg (const char *fn, const char *arg) |
Definition at line 46 of file besselj.cc.
Referenced by do_bessel().
enum bessel_type |
Definition at line 36 of file besselj.cc.
DEFUN_DLD | ( | besselj | , | |
args | , | |||
nargout | ||||
) |
Definition at line 379 of file besselj.cc.
References BESSEL_J, and do_bessel().
DEFUN_DLD | ( | bessely | , | |
args | , | |||
nargout | ||||
) |
Definition at line 453 of file besselj.cc.
References BESSEL_Y, and do_bessel().
DEFUN_DLD | ( | besselh | , | |
args | , | |||
nargout | ||||
) |
Definition at line 480 of file besselj.cc.
References BESSEL_H1, BESSEL_H2, do_bessel(), error(), error_state, and print_usage().
DEFUN_DLD | ( | airy | , | |
args | , | |||
nargout | ||||
) |
Definition at line 524 of file besselj.cc.
References airy(), biry(), error(), error_state, ierr, NDArray, print_usage(), and scale().
DEFUN_DLD | ( | besseli | , | |
args | , | |||
nargout | ||||
) |
Definition at line 462 of file besselj.cc.
References BESSEL_I, and do_bessel().
DEFUN_DLD | ( | besselk | , | |
args | , | |||
nargout | ||||
) |
Definition at line 471 of file besselj.cc.
References BESSEL_K, and do_bessel().
octave_value_list do_bessel | ( | enum bessel_type | type, | |
const char * | fn, | |||
const octave_value_list & | args, | |||
int | nargout | |||
) |
Definition at line 88 of file besselj.cc.
References octave_value_list::array_value(), octave_value::complex_array_value(), octave_value::complex_column_vector_value(), octave_value::complex_value(), DO_BESSEL, error_state, octave_value::float_complex_array_value(), octave_value::float_complex_column_vector_value(), octave_value::float_complex_value(), gripe_bessel_arg(), ierr, octave_value::is_scalar_type(), octave_value::is_single_type(), octave_value_list::length(), NDArray, dim_vector::numel(), print_usage(), and x.
Referenced by DEFUN_DLD().