octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51412] strcmp with multidimensional char arra


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #51412] strcmp with multidimensional char arrays
Date: Fri, 7 Jul 2017 16:04:53 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #1, bug #51412 (project octave):

So to me the immediately interesting cases are


>> a = ['aa'; 'bb'];
>> strcmp (a, {a})
ans =

  1
  0

>> strcmp (a, {a,a})
ans =

  1  0



>> a = ['aaa'; 'bbb'; 'ccc'];
>> strcmp (a, {a})
ans =

  1
  0
  0

>> strcmp (a, {a,a})
ans = 0


The 3-dimensional cases probably fail because


>> a = repmat ('a', 3, 3, 3);
>> iscellstr({a})
ans = 1


but elsewhere in Octave's baseline, code expects that if something is a
cellstr, it can be converted into a vector of strings.

What does Matlab iscellstr return in this case?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51412>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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