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

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

[Octave-bug-tracker] [bug #32260] dlmread does not behave correctly if s


From: D Walker
Subject: [Octave-bug-tracker] [bug #32260] dlmread does not behave correctly if source file has leading whitespace
Date: Thu, 27 Jan 2011 10:59:53 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13

URL:
  <http://savannah.gnu.org/bugs/?32260>

                 Summary: dlmread does not behave correctly if source file
has leading whitespace
                 Project: GNU Octave
            Submitted by: staccato123
            Submitted on: Thu Jan 27 10:59:52 2011
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: staccato123
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu Jan 27 10:59:52 2011  Name: test_dlmread.hpl  Size: 348B   By:
staccato123

<http://savannah.gnu.org/bugs/download.php?file_id=22533>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32260>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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