3D numerical integration error

3 ビュー (過去 30 日間)
dont panic
dont panic 2013 年 9 月 24 日
Hello,
i have writen a short code for the integration of a 2D integration field with 3 independent integration parameters and at a few points i get the following error message:
"Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 2.7e+00. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy."
The integral code is as follows:
for k=1 : numel(mp)
k
f= @(r,phi,z)((Z(k)-z).*r)./(R(k)^2-2.*r*R(k).*cos(phis-phi)+r.^2+(Z(k)-z).^2).^(3/2);
mp(k)=integral3(f,R1,R2,phi1,phi2,Z1,Z2,'AbsTol',1e-1,'RelTol',1e-1,'Method','iterated');
end
i haven't copied the whole script as it is not very well structured but the rest works and i have of course defines the integration boundaries (R1,R2...) before.
Thank you in advance
  1 件のコメント
Mike Hosea
Mike Hosea 2013 年 9 月 24 日
Well, you didn't supply any data for the parameters, so I made some up and had no trouble. Perhaps for some particular values of R(k), phis, Z(k), R1, R2, phi1, phi2, Z1, and Z2, that you have a singularity that is too strong for the code to integrate. If you supply the values for all the parameters in just one problem integration, perhaps someone can identify the problem.

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

回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by