[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
invalid recursive call?
From: |
Lasse Koskinen |
Subject: |
invalid recursive call? |
Date: |
Fri, 28 Jul 2000 11:54:42 +0300 |
Dear Friend,
I just would like to know why the following happens:
++++++++++++++++++++++++++++++++++++
$ octave
GNU Octave, version 2.0.14.93 (i386-pc-linux-gnu).
Copyright (C) 1996, 1997, 1998, 1999 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.
octave:1> function y = f (x)
> y = x .* sin (1 ./ x) .* sqrt (abs (1 - x));
> endfunction
octave:2> [v, ier, nfun, err] = quad ("f", 0, 3)
v = 1.9819
ier = 1
nfun = 5061
err = 1.1522e-07
octave:3>
++++++++++++++++++++++++++++++++++++++
Yes, this is the example found in the manual. Now, if I invoke "quad"
again, happens that
++++++++++++++++++++++++++++++++++++++
octave:3> [v, ier, nfun, err] = quad ("f", 0, 3)
error: quad: invalid recursive call
error: evaluating index expression near line 4, column 23
error: evaluating assignment expression near line 4, column 21
octave:4>
++++++++++++++++++++++++++++++++++++++
In other other words, the first calculation of quadrature worked fine but
the second came out with an error message. I noticed this always happens
with "quad", the function itself doesn't matter: you only can do it once
and then you have to restart Octave in order to use it again. What do you
think?
The version I tried is GNU Octave, version 2.0.14.93 (i386-pc-linux-gnu).
Sincerely,
Lasse Koskinen
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- invalid recursive call?,
Lasse Koskinen <=