Help with Monte Carlo sim?
Show older comments
Im messing around with the montecarlo function for integration and ran into a problem. The y bounds are between x^2 and x^3 and x are between 0 and 1. Heres the code I have so far but can't figure out how to deal with the y bounds.
N=1000; Landed=0;
for i=1:N x=rand()*1; y=rand()* Landed=Landed+1 end disp('Calculated Area Size:') area=
Accepted Answer
More Answers (0)
Categories
Find more on Monte-Carlo 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!