how to speed the calculation of a double integral with monte carlo simulation
Show older comments
Hi All,
I´m calculating an integral with Monte Carlo Simulation (mcint.m). The function that I want to integrate is a Monte Carlo calculated integral. That´s why I get a double integral. Please look at the attached screenshot.
"A" is a set containing some y-values. y=1:6. The second integral is like a tripple integral, because x consists of x_1,x_2 and x_3. Funcations m and f: R^3->R, function g:R->R.
To use Monte Carlo I have to select the number of points and it should be 10^6, but I can´t put more than 1000 because otherwise it takes very long time (with 1000 it calculates 3 hours, with 10000 - 30 hours, more than 10000 I did not try). But to use only 1000 points is not an option because the integral is not exactly calculated then. That´s why I would like to know if there might be any possibility to speed the calculation? I attached also my code in hope, that might be useful for you to understand what I´m trying to do... In file "forum" I use Monte Carlo Simulation first time. Than in "forum1" I use the previous function to calculate the integral for different numbers y(y=1:6). And finally in "forum2" I calculate the second integral based on the set A which contains some values from y=1:6.
Thank you Best Regards xanka
Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!