[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: optional arguments
From: |
John W. Eaton |
Subject: |
Re: Feature request: optional arguments |
Date: |
Fri, 11 Dec 1998 13:55:55 -0600 (CST) |
On 11-Dec-1998, A. Scottedward Hodel <address@hidden> wrote:
| What I've done with the control systems toolbox is
| to pass an empty matrix for such optional arguments, e.g.
|
| sys = ss2sys(a,b,c,[],0.01)
|
| constructs a zero "D" matrix of appropriate dimension and sets the
| system sampling time to 0.01sec. The procedure in the script is
| identical to yours except that one uses isempty(d) instead of
| exist("d").
I believe this is also the method commonly used by Matlab. Most of
the time it works OK, but there could be cases where an empty matrix
is valid but not the default. It would be nice to have a standard way
to say `use the default value for this argument, if possible' that
would always work. I think Joao's proposal is probably OK for that,
but I haven't looked to see how hard it would be to implement.
jwe