help-octave
[Top][All Lists]
Advanced

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

Re: reursion debugging


From: Robert A. Macy
Subject: Re: reursion debugging
Date: Thu, 23 Feb 2006 09:51:20 -0800

Uh,...write the code so every 1000th state gets put out.  

Or, everytime something significant happens, like the error
reduced by a factor of 1/2, or,...

Be sure to include a state of the variables for perusal.
 Then you get "snapshots" as the process (hopefully)
converges.  

Be careful of the 'sampling' approach, with oscillatory
convergence, you can get aliasing and some weird cycling.
 Sometimes a 'maximum' within a window works best.  Like
the sampling scopes do to catch wild peak bursts.  

        - Robert - 

On Thu, 23 Feb 2006 18:18:41 +0100
 Gorazd Brumen <address@hidden> wrote:
> hi guys,
> 
> yes, that is ok if you have linear code, but not when you
> have
> recursion. then you usually get thousands of output
> messages,
> when the recursion stack unfolds.
> is there really nothing sensible?
> 
> g.
> 
> Joe Koski wrote:
> > on 2/23/06 9:07 AM, Robert A. Macy at
> address@hidden wrote:
> > 
> > 
> >>Not understanding debuggers, I always write my own.
> >>
> >>insert judicious code that writes important benchmark
> >>values to a file for later review. Or display on the
> screen
> >>and watch it go by
> >>
> >>           - Robert -
> >>
> > 
> > Robert
> > 
> > I agree with your philosophy of adding output when
> debugging octave code,
> > but there is one additional point:  Octave is usually
> very good about
> > telling you where it quit and why. From that point of
> view, octave already
> > has a built-in interactive debugger.
> > 
> > Joe
> > 
> > 
> >>On Thu, 23 Feb 2006 15:43:42 +0100
> >> Gorazd Brumen <address@hidden> wrote:
> >>
> >>>Dear all,
> >>>
> >>>I have written a program, which is deeply recursive.
> >>>There are around
> >>>4 functions with each calling some others recursively.
> >>>
> >>>Can somebody suggest me a good way to debug this, or
> more
> >>>generally
> >>>a good debugger for octave?
> >>>
> >>>
> >>>Regards,
> >>>GOrazd
> >>>
> >>>
> >>>-- 
> >>>Gorazd Brumen
> >>>Mail: address@hidden
> >>>WWW: http://valjhun.fmf.uni-lj.si/~brumen
> >>>PGP: Key at http://pgp.mit.edu, ID BCC93240



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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