bugGNU Octave - Bugs: bug #42341, strrep() matlab compatibility when...

 
 

bug #42341: strrep() matlab compatibility when output is empty

Submitter:  sergey plotnikov <nul0m>
Submitted:  Mon 12 May 2014 04:19:03 PM UTC
   
 
Category:  Octave Function Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 May 2014 09:25:00 PM UTC, comment #1: 

This was trivial to solve.  I fixed it on the development branch in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/86818f2c4a92).

Rik <rik5>
Group administrator
Mon 12 May 2014 04:19:03 PM UTC, original submission:  

There's a difference between Matlab's and Octave's dimensions of output when result is supposed to be an empty string.

See the following example:


>> size(strrep('a','a','')) % Octave
ans =
   1   0

------------------------------------

>> size(strrep('a','a','')) % Matlab
ans =
     0     0



Matlab's result is more consistent with the result of size() for an empty string which is actual output of strrep() above.


>> size('') % both -- Octave and ML
ans =
     0     0


sergey plotnikov <nul0m>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by nul0m (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-05-15 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2014-05-14 rik5 Carbon-CopyRemoved 72865 -
    2014-05-14 rik5 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code