Integral3 is taking forever to finish computing integral

1 回表示 (過去 30 日間)
Jr123
Jr123 2021 年 8 月 4 日
コメント済み: Walter Roberson 2021 年 8 月 14 日
I have the following code:
fun = @(x,y,z,r,s,t) log((r.*s.*t).^2+1-2.*r.*s.*t*cos(x+y+z)).*cos(x+y+z)./(r.*s.*t);
A=integral3(@(r,s,t)arrayfun(@(r,s,t)integral3(@(x,y,z)fun(x,y,z,r,s,t),0,2*pi,0,2*pi,0,2*pi),r,s,t),1.01,100,1.01,100,1.01,100);
%B=integral3(@(r,s,t)arrayfun(@(r,s,t)integral3(@(x,y,z)fun(x,y,z,r,s,t),0,2*pi,0,2*pi,0,2*pi),r,s,t),0.1,.9,0.1,.9,0.1,.9,);
A
The value of A is not showing up even after half an hour. I wonder if there's something wrong with my code or it's just that this nested integral really takes some time to compute. Any help is greatly appreciated. Thanks!

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 8 月 4 日
編集済み: Walter Roberson 2021 年 8 月 4 日
The nested integral (6 total levels) just takes a long time to compute.
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 8 月 14 日
I have had the calculation going for the last 10 days, but it shows no sign of being finished any time soon.

サインインしてコメントする。

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by