|
| From: | anonymous |
| Subject: | [Octave-bug-tracker] [bug #33853] Incorrect element-wise vector multiplication, with an unnamed vector |
| Date: | Mon, 25 Jul 2011 08:43:59 +0000 |
| User-agent: | Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0 |
URL:
<http://savannah.gnu.org/bugs/?33853>
Summary: Incorrect element-wise vector multiplication, with
an unnamed vector
Project: GNU Octave
Submitted by: None
Submitted on: Mon 25 Jul 2011 08:43:58 UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: SHK
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.4
Operating System: Microsoft Windows
_______________________________________________________
Details:
>From the latest Octave-Forge build:
1> x = [1 1 0 1 1];
2> x .* 1:length(x)
ans =
1 2 3 4 5
If the second vector is stored as a separate variable, the correct answer is
produced:
1> x = [1 1 0 1 1];
2> y = 1:length(x);
2> x .* y
ans =
1 2 0 4 5
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33853>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |