dblquad
Integration of a function dependent on two variables.
q=dblquad(func, x0, x1, y0, y1)
(q, numeval)=dblquad(func, x0, x1, y0, y1,z0,z1, tol)
Inputs
func The function to be integrated.
x0 The lower limit of integration along the x -axis.
x1 The upper limit of integration along the x -axis.
y0 The lower limit of integration along the y -axis.
y1 The upper limit of integration along the y -axis.
tol The required accuracy of the solution.
Outputs
q The estimated value of the integral.
numeval The number of function evaluations required to compute the integral.


Description
The integral is computed for the region defined by x0 <= xlim <= x1 , and y0 <= ylim <= y1 . To compute integrals in domains which are not rectangular, the parameters y0 , y1 can be defined as functions of xlim .
Example
>>// area of a triangle
>>dblquad(@(x,y)1,0,1,0,@(x)x)
    0.5
>>// area of a circle
>>dblquad(@(x,y)1,-1,1,
>                    @(x)-sqrt(abs(1-x^2)),
>                    @(x)sqrt(abs(1-x^2))) 
    3.1416