![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1194888/image.png)
How to code integral of product of lognormal variables?
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to code integral of a product of variables which follow different distributions. Here's a simple example:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1194848/image.png)
where b is a scalar (let's say 0.65), ϵ and z are lognormal variables, and σ is a variable that follows Uniform distribution. Here,
is a particular value that σ takes which comes from solving another equation not shown here. How can I code this expression? How can I handle a variable integral limit in such cases (
in this example)?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1194853/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1194858/image.png)
댓글 수: 0
답변 (1개)
Askic V
2022년 11월 16일
Please have a look at how this example would be solved in Matlab:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1194888/image.png)
syms x y z;
f = @(x,y,z) 2*x.*exp(y).*sin(z); % define the input function
Q = integral3(f,1,2,0,1,0,pi)
댓글 수: 4
Torsten
2022년 11월 16일
편집: Torsten
2022년 11월 16일
Yes, define the integral as a function of the limit and evaluate the integral when the limit becomes known as a numerical value.
Or use symbolic computations with the limit as a symbolic variable. If you are lucky, the symbolic toolbox will be able to compute the integral involving the symbolic limit variable.
syms a b c x lb ub
f = a*x^2+b*x+c;
F = int(f,x,lb,ub)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!