F(x)= x*((1/1+exp(x-5))-(1/1+exp(3-x)))*(1/((E-x)^2+2))
where x limit from 0 to 5 nm
and E vary from 0 to 3
can anyone tell me matlab code for this to solve this integration using simpson 3/8 rule

답변 (1개)

Birdman
Birdman 2018년 1월 18일

1 개 추천

By downloading the file from the following link( simpson.m):
and type
x=0:0.1:5;%you can change the increment
E=0:3/(numel(x)-1):3;%has to be same length with x
y= x*((1/1+exp(x-5))-(1/1+exp(3-x)))*(1/((E-x)^2+2));
simpson(x,y,[],'3/8')

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

질문:

2018년 1월 18일

답변:

2018년 1월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by