怎么用matab找到对某个概率密度函数从0开始积分对应积分结果为0.5的积分上限,
3 views (last 30 days)
Show older comments
假设这个函数为f,用代码说明
1 Comment
Walter Roberson
on 27 May 2023
Approximate translation:
How to use matab to find the upper limit of integration for a certain probability density function starting from 0, and the corresponding integral result is 0.5,
Assuming that this function is f, explain it with code
Accepted Answer
Walter Roberson
on 27 May 2023
format long g
f = @(x) exp(x).^2 - sin(x); %example function
x0 = 0.8;
UB = fsolve(@(ub) integral(f, 0, ub) - 0.5, x0)
%check
integral(f, 0, UB)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!