help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to either diagnose or workaround code that makes octave get stuc


From: Przemek Klosowski
Subject: Re: How to either diagnose or workaround code that makes octave get stuck
Date: Mon, 2 Jul 2012 17:30:42 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 07/01/2012 04:08 AM, andrewcd wrote:

It turns out that I've found the source of the problem -- it was a "while
change>1e-9" thing, and change never got that low.  I've since fixed my
code, because I should never have functions that don't behave in my
application.

It would also be nice to be able to have octave skip to some section of code
whenever it gets stuck on one particular code line for longer than S
seconds.

Are either of these possible?

Sure---just write code for what you proposed to do, perhaps something like that:

now=cputime;
while ((change > 1e-9) && ((cputime()-now)<5))
 inv(hilb(10)); # your code here
end



reply via email to

[Prev in Thread] Current Thread [Next in Thread]