필터 지우기
필터 지우기

Symbolic integration vs numerical integration

조회 수: 1 (최근 30일)
carlos g
carlos g 2017년 5월 12일
편집: carlos g 2017년 5월 12일
I am trying to plot the Scorer function, which looks like this
M=1.2;
lambda=0.332;
alpha=1;
beta=1;
omega=0.1;
eta0=-i*omega/((i*alpha*lambda)^(2/3));
tan=0:0.1:20;
for j=1:length(tan)
Gi2(j)=-(airy(2,tan(j))*integral(@(n) airy(n),100,tan(j))-airy(tan(j))*integral(@(n) airy(2,n),eta0,tan(j)));
end
plot(abs(Gi2),tan)
I need to compute the derivatives of this function, so I tried to define the integrals symbolically as follows
syms lu
syms n
Gi(lu) = -(airy(2,lu)*int(airy(n),100,lu)-airy(lu)*int(airy(2,n),eta0,lu));
plot(abs(Gi(tan)),tan)
But it doesn't work. Both results are far from being the same. What am I doing wrong?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by