bugGNU Octave - Bugs: bug #43393, "importdata" fails on...

 
 

bug #43393: "importdata" fails on space delimited exp numbers

Submitter:  None
Submitted:  Thu 09 Oct 2014 07:56:11 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  philipnienhuis
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 30 Oct 2014 08:44:01 AM UTC, comment #6: 

Pushed adapted changeset here to stable:
http://hg.savannah.gnu.org/hgweb/octave/rev/8d7e760bfa68

Closing report

Philip Nienhuis <philipnienhuis>
Group Member
Mon 27 Oct 2014 05:43:17 PM UTC, comment #5: 

There's no bookmark on stable, just switch to the stable branch and do 'hg update' to get to the latest entry on stable.

Rik <rik5>
Group administrator
Mon 27 Oct 2014 05:36:24 PM UTC, comment #4: 

Thanks for reviewing. I'll fix the points you mentioned.

The cs applies to stable with a hunk #2 offset of (IIRC) 45 lines as some code has been changed in default. The hunk refers to the new test so no problem. It's easily fixed BTW.

Yesterday I was looking into how to update the "@" bookmark when pushing (it's a long time ago I last pushed). Otherwise I might already have pushed (the patch was hanging here for > 2 weeks).
It seems there's no "@" bookmark in stable? "hg -v summary" doesn't mention it here.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 27 Oct 2014 04:34:00 AM UTC, comment #3: 

The patch looks fine, and if it applies cleanly to stable I think you can go ahead and do that.  There should be one more space on the line with 'tokens', 'once' so that it aligns correctly as being part of the regexpi function call.  I would also delete the commented out regexp call below as it clutters the code.

Rik <rik5>
Group administrator
Sat 11 Oct 2014 02:03:05 PM UTC, comment #2: 

Patch attached incl. a new test.
All tests pass.

Any objections to push this to stable, as it is a bugfix rather than new or changed functionality?

(file #32253)

Philip Nienhuis <philipnienhuis>
Group Member
Sat 11 Oct 2014 12:58:04 PM UTC, comment #1: 

Confirmed in 4.1.0+
I'll have a look.

Changed some tags (release -> dev, Item group -> incorrect result)

Philip Nienhuis <philipnienhuis>
Group Member
Thu 09 Oct 2014 07:56:11 PM UTC, original submission:  

Here is how to reproduce the behavior:

Take a text file with space delimited numbers in exponential notation. Something like this (testdata.txt):


2.00E+002 4.00E-004


Then, use the "importdata" command to import those numbers:


filename = 'testdata.txt';
data1 = importdata(filename,' ') % OK
data2 = importdata(filename)     % wrong


The first command (with the explicit space delimiter) works fine. The second one (without a specified delimiter) produces a wrong result:


data1 =
   2.0000e+02   4.0000e-04
data2 =
   2 + 0i   2 + 4i  -4 + 0i


This happens with the Octave 3.8.2 release both in the Linux and in the Windows (MXE) version.

In Matlab both versions of the importdata command return the same and correct result.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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 hardy
  •  

    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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-10-30 philipnienhuis StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2014-10-11 philipnienhuis Attached File- Added importdata_bug43393.cs, #32253
        StatusConfirmed Ready For Test
        Assigned toNone philipnienhuis
    2014-10-11 philipnienhuis Item GroupMatlab Compatibility Incorrect Result
        StatusNone Confirmed
        Release3.8.2 dev
    2014-10-09 hardy Carbon-Copy- Added hardy

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code