help-octave
[Top][All Lists]

 From: Francesco Potorti` Subject: How to quad("sin(a*sin(x))*sin(x)",0,pi/2)? Date: Wed, 29 Nov 1995 10:25 +0100 (MET)

```   > for (i in 1:4)
{
}
0.691
0.906
0.533
-0.104

The above is a piece of Rlab code that does what you want (I
think). The point is: I translated quadr from Matlab source. It is
written by Kirill K. Pankratov (address@hidden)

I found the following in the matlab archives, form the
contribution/integration directory or some like that, if I am not
wrong.  They should be public domain.  I also have the sources.

===================================================================
Index for integration
===================================================================

nit: <directory>

===================================================================

Numerical Integration Toolbox

MATLAB Toolbox for 1-D, 2-D, and n-D Numerical Integration

The original 1-D routines were obtained from NETLIB and were
written by
Howard Wilson
Department of Engineering Mechanics
University of Alabama
Box 870278
Tuscaloosa, Alabama 35487-0278
Phone 205 348-1617

The rest of the routines were written by
Bryce Gardner
Ray W. Herrick Laboratories
Purdue University
West Lafayette, IN 47906
Phone: 317-494-0231
Fax:  317-494-0787

These are the general purpose integration routines:

quad2dg.m    -- 2-D integration over a rectangular region
quad2dggen.m -- 2-D integration over a general region
quadndg.m    -- n-D integration over a n-D hyper-rectangular region

===================================================================

misc: <directory>  Integration of math expressions

===================================================================

a
/
|     1
| ----------- dX
|        3
|  (1 + x  )
/
b

D. Thomas  2/93

a
/        2
|  exp(- x )
|  --------- dx
|        1/2
/    1 + x
b
D. Thomas  2/93

trapz.m:

a = trapz(y,x)

find the area under the curve y = f(x) using the trapezoidal rule
x = vector containing the independent variable data points
the elements of x need not be equally spaced
y = f(x) = vector of the function values corresponding to the
elements in x

a = the area under f(x) in the interval defined by x

Written by: Duane Hanselman, University of Maine, (207)-581-2246

```