bbok 发表于 2006-11-26 15:34

求助 关于 integer too large in context的错误如何解决??

Matlab 算到一定步数之后出现错误“Error, (in type/matrix) integer too large incontex"
请问如何解决?谢谢

eight 发表于 2006-11-26 15:38

贴出错部分的源程序

[ 本帖最后由 ChaChing 于 2010-6-14 10:50 编辑 ]

bbok 发表于 2006-11-26 16:06

整个程序很长,我算前几步的时候都没有问题的,问题是为何到一定步数就出错?

eight 发表于 2006-11-26 16:28

没有遇到过,不清楚;没有源代码,无法分析

[ 本帖最后由 ChaChing 于 2010-6-14 10:51 编辑 ]

happy 发表于 2006-11-27 11:40

这个问题在mathworks上有解决方案

Subject:
Why do I receive the error message "Error, integer too large in context" while using the Symbolic Math Toolbox?

Problem Description:
The following example produces an error:

I=sqrt(-1);
j=0;
for E=1000:0.01:1100,
j=j+1;
f(j)=zeta(0.5+I*E);
end

The error message I receive is:
??? Error using ==> maple
Error, integer too large in context

Error in ==> C:\MATLAB6p5\toolbox\symbolic\digits.m
On line 18 ==> r = eval(maple('Digits;'));

Error in ==> C:\MATLAB6p5\toolbox\symbolic\@sym\double.m
On line 16 ==> d = digits;

Error in ==> C:\MATLAB6p5\toolbox\symbolic\zeta.m
On line 10 ==> Z = double(zeta(sym(n)));

Error in ==> C:\MATLAB6p5\work\sven_aberg\test.m
On line 9 ==> f(j)=zeta(0.5+i*E);


Solution:
This may be a problem with the way memory management is performed by Maple. At present, the only potential workaround is to wrap your call to a symbolic calculation that operates on numbers with large numbers of digits inside a TRY/CATCH block and clear the Maple function using the following commands:

For Symbolic Math 2.1.3 (R13) and earlier:

maple clear

% or

maple restart

For Symbolic Math 3.0 (R13+) and later:

clear maplemex


Alternatively you may increase the frequency of automatic garbage
collections, which occurs (approximately) after every <integer>
words used in maple using the following command:

maple('kernelopts(gcfreq=10000)');


For further information on the use of this command type:

mhelp kernelopts

bbok 发表于 2006-11-29 08:40

非常感谢happy,现在问题已经解决了。

笨笨、石头 发表于 2010-12-15 08:54

{:{13}:}
楼主 上边的解决方案在程序里要怎么用啊?

mareszk 发表于 2011-3-23 15:06

求帮助,我遇到同样的问题了

ChaChing 发表于 2011-3-23 23:29

回复 8 # mareszk 的帖子

5F不是提供解决方案了?

mareszk 发表于 2011-3-24 15:45

回复 9 # ChaChing 的帖子

五楼的方法在我那里不好使啊

高恩武 发表于 2012-11-21 15:47

这个问题怎么解决呀,求高手指点一下呀

happy 发表于 2012-11-22 20:36

高恩武 发表于 2012-11-21 15:47 static/image/common/back.gif
这个问题怎么解决呀,求高手指点一下呀

参考5楼解决方案
页: [1]
查看完整版本: 求助 关于 integer too large in context的错误如何解决??