help-octave
[Top][All Lists]
Advanced

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

Re: programming recursion


From: Søren Hauberg
Subject: Re: programming recursion
Date: Wed, 29 Oct 2008 11:25:27 +0100

ons, 29 10 2008 kl. 11:10 +0100, skrev BVBA NuKey Music:
> I'm trying to program the following in octave (preferably
> matlab-compatible) using recursion:

[snip]

> N(n)=T(n)+N(n)

Here's your problem. This is an infinite loop. Perhaps you ment
something like

  N (n) = T (n) + N (n-1)

? At least, by letting N (n) depend on N (n) gives you an infinite
recursion.

Søren



reply via email to

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