varargin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

varargin

Daniel Heiserer
hi,
how can I step through the input arguments using a parameter:
e.g.
----------------------------------
for iarg=1:nargin
        s=varargin(iarg)
end
----------------------------------

Bye

--
Mit freundlichen Gruessen
                                 Daniel Heiserer
-----
--------------------------------------------------------------
Dipl.-Phys. Daniel Heiserer, BMW AG, Knorrstrasse 147, 80788 Muenchen
Abteilung EK-20
Tel.: 089-382-21187, Fax.: 089-382-42820
mailto:[hidden email]


Reply | Threaded
Open this post in threaded view
|

varargin

John W. Eaton-6
On 19-May-1999, Daniel Heiserer <[hidden email]> wrote:

| how can I step through the input arguments using a parameter:
| e.g.
| ----------------------------------
| for iarg=1:nargin
| s=varargin(iarg)
| end
| ----------------------------------

I don't think there is any way to mimic the behavior of varargin
without implementing it as a built-in function in C++.

Also, from what I understand of varargin, it would not be as simple as
just implmenting a function, because you would also have to modify the
parser to accept

  function foo (varargin)

as valid syntax to mean the same thing as

  function foo (...)


jwe