[Top][All Lists]

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

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

From: Rik
Subject: [Octave-bug-tracker] [bug #51412] strcmp with multidimensional char arrays
Date: Tue, 11 Jul 2017 12:25:48 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Update of bug #51412 (project octave):

                  Status:                    None => Confirmed              


Follow-up Comment #9:

This does need to be tackled, but it is not going to be easy.  Matlab's
documentation refers to cellstr as

"A cell array of character vectors is a cell array where every cell contains a
character vector."

Octave has assumed, quite reasonably, that a character vector is a 1xN char
array.  But the code examples clearly show that Matlab doesn't require a
vector---It only requires a char array object for each cell.

Also, Matlab has recently introduced string arrays which are yet another
fundamental object type to join char arrays and cellstrs.  Eventually Octave
will probably support these so it makes sense that at the same time that
is_string, string_value, and cellstr_value are overhauled to make them Matlab
compatible, that we also address string arrays.  In fact, we might want to
reserve is_string to test for the new string array class and use another
function name (maybe ischar?) to test if something is just a char array.

Some more slightly bad news.  I did work up a cset that fixes the issue with
strcmp, but by avoiding cellstr it is 10X slower.  


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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