[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space: |
Date: |
Wed, 7 Jun 2017 07:01:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
Follow-up Comment #5, bug #51187 (project octave):
When the input is a char array, it seems that it is transformed to a cell
array in Matlab (with spaces stripped):
>> ismember(strvcat('a ','bc'),{'a ','bc'})
ans =
2×1 logical array
0
1
so a fix could be:
if (size(x,1) == 1)
x = {x};
else
x = cellstr (x);
endif
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51187>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Dave Goel, 2017/06/06
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/06
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/06
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/06
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, John W. Eaton, 2017/06/06
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:,
Guillaume <=
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/07
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Rik, 2017/06/08
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/09
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/09
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Rik, 2017/06/09
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/09
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Rik, 2017/06/09
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/10
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Philip Nienhuis, 2017/06/13
- [Octave-bug-tracker] [bug #51187] ISMEMBER fails if the string ends in a space:, Rik, 2017/06/13