Symbolic integration vs numerical integration
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!