`q=triplequad(func, x0, x1, y0, y1)`

`(q, numeval)=triplequad(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. |

`z0` |
The lower limit of integration along the `z` -axis. |

`z1` |
The upper limit of integration along the `z` -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. |

The integral is computed for the region defined by

`x0 <= xlim <= x1`

,
`y0 <= ylim <= y1`

, and `z0 <= zlim <= z1`

. To compute integrals in domains
which are not cuboids, the parameters `y0`

, `y1`

can be defined as functions
of `xlim`

, and `z0, z1`

may be defined as functions of `xlim`

and `ylim`

.
>>// Volume of a sphere>>triplequad(@(x,y,z)1,-1,1,> @(x)-sqrt(abs(1-x^2)),> @(x)sqrt(abs(1-x^2)),> @(x,y)-sqrt(abs(1-x^2-y^2)),> @(x,y)sqrt(abs(1-x^2-y^2)))4.1888