[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Matlab-style empty output/input arguments support
From: |
Judd Storrs |
Subject: |
Re: Matlab-style empty output/input arguments support |
Date: |
Fri, 29 Jan 2010 12:16:43 -0500 |
On Fri, Jan 29, 2010 at 3:59 AM, Jaroslav Hajek <address@hidden> wrote:
>
> The problem with option 1 (shrinking the list) is that you wouldn't be
> able to do things like
> [d, ~, f] = [a, ~, c] = myfun (...)
> with the obvious meaning (f would be undefined here).
Under option 1, you would get the same effect by omitting the ~ on the
last assignment. i.e. by doing this instead:
[d, f] = [a, ~, c] = myfun ( ... )
I'm fine with option 2, though. Treating ~ like [] seems somewhat
symmetric with empty positional arguments.
min(a,[],2)
min(a,~,2)
--judd
Re: Matlab-style empty output/input arguments support, Jaroslav Hajek, 2010/01/29
- Re: Matlab-style empty output/input arguments support, John W. Eaton, 2010/01/29
- Re: Matlab-style empty output/input arguments support, Jaroslav Hajek, 2010/01/29
- Re: Matlab-style empty output/input arguments support, Søren Hauberg, 2010/01/29
- Re: Matlab-style empty output/input arguments support, Jaroslav Hajek, 2010/01/29
- Re: Matlab-style empty output/input arguments support, John W. Eaton, 2010/01/29
Re: Matlab-style empty output/input arguments support, Michael D Godfrey, 2010/01/29
Re: Matlab-style empty output/input arguments support, Michael D Godfrey, 2010/01/29
Re: Matlab-style empty output/input arguments support, Jaroslav Hajek, 2010/01/30