Hi,
So as the title says I want to evaluate the integral of PDF function but also with other expressions in the integral, Also my input x for the PDF function is a division of two variables.
Need help!
using : MATLAB R2019a
Thank you.
int.jpeg
See picture.

 채택된 답변

Walter Roberson
Walter Roberson 2020년 2월 10일

0 개 추천

syms R t w
PDF = @(x) exp(-x.^2/2) / sqrt(sym(2)*sym(pi));
result = int(PDF(t/R) / R * (1-t/w), t, 0, w)

댓글 수: 2

rnd rnd
rnd rnd 2020년 2월 10일
Thank you, it seems I am missing the Symbolic Math Toolbox.
Can you help me with workarround solution?
R = randn;
w = 10 * rand;
PDF = @(x) exp(-x.^2/2) ./ sqrt(2*pi);
fun = @(t)PDF(t/R)./R.*(1-t./w);
result = integral(fun, 0, w)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

태그

질문:

2020년 2월 10일

댓글:

2020년 2월 10일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by