bugGNU Octave - Bugs: bug #48725, Octave deblank cannot accept empty...

 
 

bug #48725: Octave deblank cannot accept empty result

Submitter:  Ken Tsui <kentsui>
Submitted:  Tue 09 Aug 2016 02:26:23 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  siko1056
Originator Name:  KT Open/Closed:  * Closed
Release:  * 4.0.3 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 10 Aug 2016 08:34:46 AM UTC, comment #1: 

I pushed a fix for the next release of Octave http://hg.savannah.gnu.org/hgweb/octave/rev/54dc5062879e .

Kai Torben Ohlhus <siko1056>
Group Member
Tue 09 Aug 2016 02:26:23 AM UTC, original submission:  

If an empty array is inputted into the deblank function, it will return "deblank: S argument must be a string or cellstring" while Matlab will return back the empty array.

Example of the error:

>> deblank([])
error: deblank: S argument must be a string or cellstring
error: called from
    deblank at line 73 column 5



Proposal:
Modify "C:\Octave\Octave-4.0.3\share\octave\4.0.3\m\strings\deblank.m" as follows.


...
  elseif (isempty(s)) %KT - Added
    s=s; %KT - Added
  else
    error ("deblank: S argument must be a string or cellstring");
  endif


Ken Tsui <kentsui>

 

(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 siko1056 (Updated the item)
  • -email is unavailable- added by kentsui (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-10 siko1056 StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2016-08-10 siko1056 CategoryNone Octave Function
        StatusConfirmed In Progress
        Assigned toNone siko1056
    2016-08-09 siko1056 StatusNone Confirmed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code