Symbolic integration vs numerical integration

2 ビュー (過去 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 Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by