bugGNU Octave - Bugs: bug #32260, dlmread does not behave correctly...

 
 

bug #32260: dlmread does not behave correctly if source file has leading whitespace

Submitter:  D Walker <staccato123>
Submitted:  Thu 27 Jan 2011 10:59:52 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  staccato123 Open/Closed:  * Closed
Release:  * 3.2.3 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 27 Jan 2011 11:41:21 AM UTC, comment #1: 

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/99b00a9a5147

It seems to fix the problem for me, so I'm closing this report.

John W. Eaton <jwe>
Group administrator
Thu 27 Jan 2011 10:59:52 AM UTC, original submission:  

Situation:

I have a datafile ('test_dlmread') of the form:

 95 -2.6331 1.002942 -7.748709E-5
 96 -9.3562 0.996187 -7.879264E-5
 97 -6.5834 1.000710 -8.011319E-5
 98 -3.1648 1.002822 -8.144877E-5
 99 -4.1524 1.002292 -8.279940E-5
100 -0.4680 1.005519 -8.416512E-5
101 -5.1780 1.001299 -8.554596E-5
102 2.0769 1.003992 -8.694194E-5
103 -3.8485 1.006129 -8.835310E-5
104 4.5459 1.003781 -8.977946E-5

(i.e. the first column is a series of integers with leading padding if there are fewer than 3 digits)

in Matlab 2009 on Windows:

>> dlmread('test_dlmread.hpl')

ans =

   95.0000   -2.6331    1.0029   -0.0001         0
   96.0000   -9.3562    0.9962   -0.0001         0
   97.0000   -6.5834    1.0007   -0.0001         0
   98.0000   -3.1648    1.0028   -0.0001         0
   99.0000   -4.1524    1.0023   -0.0001         0
  100.0000   -0.4680    1.0055   -0.0001         0
  101.0000   -5.1780    1.0013   -0.0001         0
  102.0000    2.0769    1.0040   -0.0001         0
  103.0000   -3.8485    1.0061   -0.0001         0
  104.0000    4.5459    1.0038   -0.0001         0

In Octave 3.2 with octaveforge on Ubuntu:


octave:1> dlmread('test_dlmread.hpl')
ans =

     0.00000    95.00000    -2.63310     1.00294    -0.00008
     0.00000    96.00000    -9.35620     0.99619    -0.00008
     0.00000    97.00000    -6.58340     1.00071    -0.00008
     0.00000    98.00000    -3.16480     1.00282    -0.00008
     0.00000    99.00000    -4.15240     1.00229    -0.00008
   100.00000    -0.46800     1.00552    -0.00008     0.00000
   101.00000    -5.17800     1.00130    -0.00009     0.00000
   102.00000     2.07690     1.00399    -0.00009     0.00000
   103.00000    -3.84850     1.00613    -0.00009     0.00000
   104.00000     4.54590     1.00378    -0.00009     0.00000


i.e. it should ignore the leading whitespace, and does not. Test data file attached.

D Walker <staccato123>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #22533:  test_dlmread.hpl added by staccato123 (348B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by staccato123 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-01-27 jwe StatusNone Fixed
        Open/ClosedOpen Closed
    2011-01-27 staccato123 Attached File- Added test_dlmread.hpl, #22533

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code