octave-maintainers
[Top][All Lists]
Advanced

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

Re: nchoosek


From: Julien Bect
Subject: Re: nchoosek
Date: Mon, 01 Sep 2014 07:05:46 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 01/09/2014 03:35, Rik a écrit :
However, when the first input is a vector, the input is treated as a set.

[snip]

so I don't think it should return [0, 0].

Ooops, I should have read the documentation more carefully. You're right, of course.

If I had to vote I would change the first case
to return 0 since that is close to the second case of returning the empty
set [].

I would vote almost the same. Indeed, for consistency, we should have

numel (nchoosek (1:n, k)) == nchoosek (n, k)

=> nchoosek (5, 8) = length ([]) = 0.

@++
Julien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]