[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #29628] assignment of logical argument is brok
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #29628] assignment of logical argument is broken |
Date: |
Wed, 21 Apr 2010 14:46:25 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9 |
URL:
<http://savannah.gnu.org/bugs/?29628>
Summary: assignment of logical argument is broken
Project: GNU Octave
Submitted by: None
Submitted on: Wed 21 Apr 2010 02:46:24 PM UTC
Category: Interpreter
Severity: 3 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Alois Schlögl
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
The assignment to a vector with an empty index list
clear x
x([]) = 0
yields an empty result, which is correct.
x = [](0x0)
However, if the rhs-value is of type logical
clear x
x([]) = logical(0)
the result is a scalar, which is incorrect.
x = 0
This behaviour is inconsistent. Moreover, it breaks also the following
command:
x=repmat(logical(0),0,1)
error: reshape: can't reshape 1x1 array to 0x1 array
error: called from:
error: /usr/local/share/octave/3.3.51+/m/general/repmat.m at line 64,
column 7
The behavior is observed on 3.2.2 and the 3.3.51+ compiled in the last two
days.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?29628>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #29628] assignment of logical argument is broken,
anonymous <=