MATLAB: Solving Error with Huge Integral Calculs

  • Context: MATLAB 
  • Thread starter Thread starter Sabine
  • Start date Start date
  • Tags Tags
    Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
Sabine
Messages
43
Reaction score
0
I am asking MATLAB to run a program I created. This program requires a huge calcul of integrals. If I reduce the number of integrals (which I can't if I want to study the real case) the program gives me a correct result. But if I keep it with all his calculs (nearly 1200 integrals), I have the answer :" Error, (in csgn) integer too large in context ". Why is that and how can I solve it?

thx in advance
 
Physics news on Phys.org
Sabine said:
I am asking MATLAB to run a program I created. This program requires a huge calcul of integrals. If I reduce the number of integrals (which I can't if I want to study the real case) the program gives me a correct result. But if I keep it with all his calculs (nearly 1200 integrals), I have the answer :" Error, (in csgn) integer too large in context ". Why is that and how can I solve it?

thx in advance

I don't know this exact error, but you should set a breakpoint, or toggle the "stop if error" breakpoint option. You'll be able to figure out exactly where (as in which line) your script is breaking down. More MATLAB M-File debugging tips:
http://www.mathworks.com/support/tech-notes/1200/1207.html

(BTW, you may want to run the intmax command: returns the maximum integer size on your system, which may or may not tell you why the command is failing).
 
Hi Sabine,

I don't understand your PM. If you don't know how to set breakpoints, or set the "stop if error" option, see Section 7 in the link above.