[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #29785] failiure to discard the last matrix el
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #29785] failiure to discard the last matrix element |
Date: |
Wed, 05 May 2010 11:50:31 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100402 Namoroka/3.6.3 |
URL:
<http://savannah.gnu.org/bugs/?29785>
Summary: failiure to discard the last matrix element
Project: GNU Octave
Submitted by: None
Submitted on: Wed 05 May 2010 11:50:30 AM UTC
Category: Interpreter
Severity: 3 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.3
Operating System: GNU/Linux
_______________________________________________________
Details:
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.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29785>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #29785] failiure to discard the last matrix element,
anonymous <=