How to get the upper limit of a integration?
1 view (last 30 days)
Show older comments
Hello,
I have a probility distrubution fucntion which is the following:
f = @(x) h0 * (1/sqrt(2*pi*sig2)) .* exp(-(x-mh0).^2 / (2*sig2))+ (1-h0) * (1/sqrt(2*pi*sig2)) .* exp(-(x-mh1).^2 / (2*sig2));
The range for this function is (-4 , 8). I would like to divide this area into equal mass i.e. 1/10 ( 10 intervals, each with mass 1/10).
I am thinking about integrating it and check the upper limit as know the result of the integration. But I didn't find a way to do this?
Can anyone please help me with this?
Thanks in advacne
1 Comment
Jonas
on 11 May 2021
you could calculate the function for many points between -4 and 8 and then use the cumumlative sum (cumsum()) on the results.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!