help-octave
[Top][All Lists]
Advanced

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

matlab nargin() function alternative in octave?


From: Sharene Deanne Bungay
Subject: matlab nargin() function alternative in octave?
Date: Mon, 19 Jan 2004 23:43:41 -0500

Hi all,
I have some matlab code that I would very much like
to use under octave. Unfortunately, the matlab code
relies on matlab's ability to pass a function as an
argument to nargin ( eg. nargin('sin')) and have it return
the number of arguments expected by that function.
I know that under octave, nargin is only a local scope scalar
valid inside a given function, but does there exist a means
under octave to get the number of expected arguments to a function
(outside the scope of that function)?

(This functionality is required since I have functions that are
conditionally defined to take different arguments, and subsequent
behaviour requires knowledge of the number of arguments. Rewriting
the code to use global variables instead of relying on the form of
the function definitions would be too extensive, so any help
on this matter would be *GREATLY* appreciated.)

Thanks for any suggustions!
Cheers,
Sharene



-------------------------------------------------------------
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]