怎么用matab找到对某个概率密度函数从0开始积分对应积分结果为0.5的积分上限,
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
假设这个函数为f,用代码说明
1 Commento
Walter Roberson
il 27 Mag 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
Risposta accettata
Walter Roberson
il 27 Mag 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)
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!