[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46897] nchoosek accepting non-numeric input
From: |
Luis Mendo |
Subject: |
[Octave-bug-tracker] [bug #46897] nchoosek accepting non-numeric input |
Date: |
Fri, 15 Jan 2016 19:20:39 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36 |
Follow-up Comment #3, bug #46897 (project octave):
I'm sorry for the confusion. By `unique` I meant `nchoosek`. It does make
sense. For example, `nchoosek(1:3,2)` currently produces
1 2
1 3
2 3
My proposal is to have `nchoosek('abc',2)` produce
ans =
ab
ac
bc
and to have `nchoosek('{'a', 2, 'ttt'},2)` produce
ans =
'a' [ 2]
'a' 'ttt'
[2] 'ttt'
like Matlab does. My attached function achieves that.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46897>
_______________________________________________
Mensaje enviado vía/por Savannah
http://savannah.gnu.org/