Computing an specific numerical Integral

조회 수: 1(최근 30일)
Coo Boo
Coo Boo 2020년 2월 8일
편집: Coo Boo 2020년 2월 8일
Hi,
Can anyone help me in computing the following integral?
Thanks
integral.jpg
  댓글 수: 2
Coo Boo
Coo Boo 2020년 2월 8일
Is it really so simple that it seems to be a homework? No, it's not really a homework. It is actually the first step in a research work. It is a fitness function that I have to optimize it through heuristic methods considering weights (wi) as the optimization variables.

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

채택된 답변

David Hill
David Hill 2020년 2월 8일
You could just expand the sumations since there are only 5.
fun=@(x)(.5*(1-x).^4+6*x.*(1-x).^3+4.5*x.^2.*(1-x).^2+4*x.^3.*(1-x)+.5*x.^4).*log(.5*(1-x).^4+6*x.*(1-x).^3+4.5*x.^2.*(1-x).^2+4*x.^3.*(1-x)+.5*x.^4);
y=integral(fun,0,1);
  댓글 수: 3
Coo Boo
Coo Boo 2020년 2월 8일
Thanks for your help.

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

추가 답변(1개)

Stijn Haenen
Stijn Haenen 2020년 2월 8일
I think you should use a Riemann integral to estimate the answer of this integral.
Or maybe wolfram Mathematica can solve it for you.
  댓글 수: 1
Coo Boo
Coo Boo 2020년 2월 8일
Thanks. But I need it in Matlab. Do you have any idea for solving it in Matlab with a 'for' loop or vectorized summation for any arbitrary n, e.g., n=100?

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by