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

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

[Octave-bug-tracker] [bug #59917] strmatch Matlab compatibility


From: Rik
Subject: [Octave-bug-tracker] [bug #59917] strmatch Matlab compatibility
Date: Wed, 20 Jan 2021 14:05:05 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Update of bug #59917 (project octave):

                  Status:                    None => Need Info              
        Operating System:                  Mac OS => Any                    

    _______________________________________________________

Follow-up Comment #2:

strmatch is not recommended for a reason.  For example, it produces the wrong
values in Matlab.


a = { 'dfr' 'tgh' 'rere' 'rere' };
a2 = repmat (a, 2, 1);
idx = strmatch ('rere', a2, 'exact')
idx = [ 3
        4
        7
        8 ]
a2(idx)
ans = { 'tgh'
        'tgh'
        'rere'
        'rere' }


Octave gets the indices for this right, and returns them as a column vector.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59917>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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