bugGNU Octave - Bugs: bug #29785, failiure to discard the last...

 
 

bug #29785: failiure to discard the last matrix element

Submitted by:  None
Submitted on:  Wed 05 May 2010 11:50:30 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Jaroslav Hajek <highegg>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.3
Operating 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 06 May 2010 12:51:05 PM UTC, comment #1:

fix is online
http://hg.savannah.gnu.org/hgweb/octave/rev/f5f6bde82e19

thanks

Jaroslav Hajek <highegg>In charge of this item.
Wed 05 May 2010 11:50:30 AM UTC, original submission:

Hello, consider the following code (the goal is to discard last element from a matrix converting the matrix to a 1D vector):
octave:25> tst = rand(2)
tst =

0.032879 0.616754
0.752301 0.550359

octave:26> tst(4) = []
error: resize: Invalid resizing operation or ambiguous assignment to an out-of-bounds array element.

However,
octave:26> tst(3) = []
tst =

0.032879 0.752301 0.550359
discards the "third" element

Moreover running
octave:28> tst = rand(2)
tst =

0.72830 0.99564
0.51382 0.24457

When I perform
octave:29> tst = tst(:);
octave:30> tst(4) = []
tst =

0.72830
0.51382
0.99564

the 4th element gets discarded, as intended.

Therefore the first error is IMHO a bug.

Anonymous

 

(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 highegg (Updated 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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 06 May 2010 12:51:05 PM UTChigheggStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 06 May 2010 12:45:12 PM UTChigheggItem GroupNone=>Incorrect Result
      Assigned toNone=>highegg

    Back to the top


    Powered by Savane 3.1-cleanup1