フィルターのクリア

Double integral using integral2, too many input arguments

1 回表示 (過去 30 日間)
carlos g
carlos g 2017 年 5 月 5 日
編集済み: carlos g 2017 年 5 月 8 日
This is the code:
for Y=0:0.01:N,
eta(round(1+Y*100))=((i*alpha*lambda)^(1/3))*Y+eta0;
V2(round(1+Y*100))=((i*alpha*lambda)^(-2/3))*q*integral2(@(n) airy(n),eta0,eta,eta0,eta);
end
What's going on?
Error using profiles>@(n)airy(n)
Too many input arguments.

回答 (2 件)

John D'Errico
John D'Errico 2017 年 5 月 5 日
編集済み: John D'Errico 2017 年 5 月 5 日
Integral2 assumes the function must have TWO variables. After all, there are TWO integrals being done here. Now read the error message:
Error using profiles>@(n)airy(n)
Too many input arguments.
The function airy that you pass in only has ONE input argument, correct?
Part of me wonders if you are just trying to integrate that function twice. If that is true, then you have chosen the wrong tool, since integral2 is NOT designed to solve that problem.

carlos g
carlos g 2017 年 5 月 5 日
編集済み: carlos g 2017 年 5 月 8 日
Thank you! That is exactly what I want to do.
How could I then do?

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by