multiple integration with variable limits

3 views (last 30 days)
Patrick
Patrick on 28 Nov 2013
Answered: Walter Roberson on 28 Nov 2013
Hi all,
How can I conduct multiple integration (up to n times) on a 1d vector where the integration limits involve variables? The vector in my case actually represents the probability density function of a convolution of a few uniform random variables.
A simplified version of my problem for the case where n=3 is as shown:
integrate( integrate( integrate(the vector from 1 to x2) from 2 to x3) from 3 to x4) dx1 dx2 dx3 ,where x1, x2, x3, x4 are variables.
Previously I had attempted to use symbolic integration but since the integral does not have an explicit form, it didn't work out.
After reading http://www.mathworks.com/matlabcentral/newsreader/view_thread/290040 , I suppose I have to use trapz or cumtrapz, but even after reading the documentations, I am still not sure how to apply them to my problem.
Does anyone know how can I approach this? Thank you very much!
Patrick.

Answers (1)

Walter Roberson
Walter Roberson on 28 Nov 2013
If the variables are to remain unresolved, then all you can do is use the symbolic form. You might possibly then be able to use matlabFunction() to turn it into a call to a numeric solver, but I do not know if that would always be possible.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!