bugGNU Octave - Bugs: bug #35824, proposed fix for: textread: A(I):...

 
 

bug #35824: proposed fix for: textread: A(I): index out of bounds;

Submitted by:  indium <indium>
Submitted on:  Tue 13 Mar 2012 10:25:33 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 13 Mar 2012 08:16:23 PM UTC, comment #1:

this bug was already fixed last week:
http://hg.savannah.gnu.org/hgweb/octave/rev/df5488e46dca
c.

Carlo de Falco <cdf>
Project Member
Tue 13 Mar 2012 10:25:33 AM UTC, original submission:

in ....//3.7.0+/m/io/textread.m

change line 75:

to:
Because:

When using the 'skip headerlines' facility (and nothing else), the varargin is made empty after the skipping. isnumeric() will then choke on varargin{1}.

Example: when reading this file:
I get the following error:

I think the problem is in varargin{1}:

in the beginning varargin has two components:
varargin =
{
[1,1] = headerlines
[1,2] = 3.0000e+00
}

but after processing these in .../3.7.0+/m/io/textread.m line 67 to 73, these two components are removed:

varargin(headerlines:headerlines+1) = [];

Which is why varargin{1} is none-existant.

indium <indium>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Updated the item)
  • -unavailable- added by cdf (Posted a comment)
  • -unavailable- added by indium (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 17 Mar 2012 06:06:45 PM UTCjordighStatusNone=>Fixed
    Tue 13 Mar 2012 08:16:23 PM UTCcdfOpen/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1