--- Pedro Antonio Fructuoso Merino <pfr...@fa...> wrote:
> Hi all,
> Suport octave rescursive function? In this case, how can I implement
> it? I'm trying something like that:
> function res = test(a)
> if (a>0)
> j = test(a)
> res = a + j,
> else
> res = 0;
> endif
> endfunction
> but it's fauls...
> Pedro
>
I think there's a bug in your function: if a is positive, then the function
"test" will get called again and again until you reach max_recursion_depth,
which is 256 by default.
William Poetra Yoga Hadisoeseno
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
|