A real-valued integral is calculated in n-dimensional space by averaging the value of a function over a large number of randomly selected points within the hypervolume to be integrated. Finite or infinite integral bounds are permitted (ie. ordinary and improper integrals are supported), and multiple functions can be integrated simultaneously over the same domain. The hypervolume can be of arbitrary shape, as long as it can be expressed as a series of logical conditions on the coordinates.
The integrator can be used for something as simple as a usual 1-D finite integral, or for something as complicated as a n-D improper integral of a function with singularities over an oddly shaped domain.
Files:
mcint.m -- the integrator
learnmcint.m -- a library of examples which will show you how to use the integrator
jacobian.m -- an optional file which will calculate the jacobian of coordinate transformations for you