bugGNU Octave - Bugs: bug #47909, load and += does not add

 
 

bug #47909: load and += does not add

Submitted by:  Y Iwasaki <oct4020160521>
Submitted on:  Thu 12 May 2016 02:46:52 PM UTC  
 
Category: InterpreterSeverity: 4 - Important
Priority: 5 - NormalItem Group: Incorrect Result
Status: DuplicateAssigned to: None
Originator Name: Iwasaki YOpen/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.

 

Thu 12 May 2016 05:12:59 PM UTC, comment #3:

Marking as a duplicate

Rik <rik5>
Project Administrator
Thu 12 May 2016 05:00:08 PM UTC, comment #2:

This is essentially the same as bug #47676. There is more discussion there.

John W. Eaton <jwe>
Project Administrator
Thu 12 May 2016 04:54:13 PM UTC, comment #1:

Confirmed. This bug exists for the current stable version of Octave (4.0.2) as well as on the development branch.

The bug is not specific to the file format used to save the variable 'a'. I have used Octave's own binary and text formats and the errors are the same. The bug is specific to executing the lines within an m-file. I have tried both the original file, which is actually just a script. I have also tried wrapping the script lines within function/endfunction and calling b42(), but that fails as well.

The error on line 2 comes from using the in-place += operator. If I use the line

then the code also works. It would appear that the row/column indices for the += operation are not being generated correctly because on the development branch I get the slightly more informative error

It is clear that Octave knows the size is 10x10.

Rik <rik5>
Project Administrator
Thu 12 May 2016 02:46:52 PM UTC, original submission:

Prepare script "b42.m" as following three lines

Start Octave and type following two lines

Exit Octave and restart Octave and type

Octave shows
ans = 1

a(1,1) should be 2.
Changing a=ones(61,49) to a=ones(10,10) results in
error: b42: A(I,J): row index out of bounds; value 61 out of bound 10
error: called from
b42 at line 2 column 1

Y Iwasaki <oct4020160521>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by oct4020160521 (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 12 May 2016 05:18:32 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Thu 12 May 2016 05:13:15 PM UTCrik5StatusConfirmed=>Duplicate
    Thu 12 May 2016 05:12:59 PM UTCrik5Dependencies-=>Depends on bugs #47676
    Thu 12 May 2016 04:54:13 PM UTCrik5Severity3 - Normal=>4 - Important
      StatusNone=>Confirmed
      Release3.8.2=>dev
      Summaryload and += doesnot add=>load and += does not add

    Back to the top


    Powered by Savane 3.1-cleanup1