![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293739/image.png)
Integral of exponential function that contains another integral
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello everyone,
I have the following integral:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293711/image.png)
where
and c is a constant in one case and
in another case. In addition, my r values are
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293712/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293713/image.png)
r = linspace(0,4,100);
Can you please help me with the way to code this?
Thank you,
djr
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 5월 17일
Try this
inner_int = @(t) integral(@(s) (1-exp(-s))./s, 0, t);
H = @(xi) integral(@(t) exp(-t+3*inner_int(t)), 0, xi, 'ArrayValued', 1);
r = linspace(0,4,100);
c = 1; % for example
Xi = c*r.^2;
H_val = zeros(size(Xi));
for i=1:numel(Xi)
H_val(i) = H(Xi(i));
end
plot(Xi, H_val);
xlabel('\xi');
ylabel('H(\xi)')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/293739/image.png)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!