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

 
 

bug #29785: failiure to discard the last matrix element

Submitter:  None
Submitted:  Wed 05 May 2010 11:50:30 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  highegg
Originator Name:  Originator Email:  -email is unavailable-
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 06 May 2010 12:51:05 PM UTC, comment #1: 
Jaroslav Hajek <highegg>
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by highegg (Updated 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-06 highegg StatusNone Fixed
        Open/ClosedOpen Closed
    2010-05-06 highegg Item GroupNone Incorrect Result
        Assigned toNone highegg

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code