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: Guillaume
Subject: [Octave-bug-tracker] [bug #51412] strcmp with multidimensional char arrays
Date: Mon, 10 Jul 2017 05:25:39 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

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

Here is the Matlab output for the same calls:


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

ans =

  2x1 logical array

   0
   0

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

ans =

  1x2 logical array

   0   0

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

ans =                        

  3x1 logical array

   0
   0
   0

>> strcmp (a, {a,a})
Error using strcmp
The number of rows of the string matrix must match the number of elements in
the cell vector.

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

ans =

  logical

   1


    _______________________________________________________

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]