[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #31764] logical indexing regression 3.0.1 vs 3
From: |
jkirby |
Subject: |
[Octave-bug-tracker] [bug #31764] logical indexing regression 3.0.1 vs 3.2.4 (also dev) - differs from Matlab |
Date: |
Fri, 03 Dec 2010 01:53:25 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5 |
URL:
<http://savannah.gnu.org/bugs/?31764>
Summary: logical indexing regression 3.0.1 vs 3.2.4 (also
dev) - differs from Matlab
Project: GNU Octave
Submitted by: jkirby
Submitted on: Fri 03 Dec 2010 01:53:24 AM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: jkirby
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.2.4
Operating System: Microsoft Windows
_______________________________________________________
Details:
this script correctly returns geo = 0.62970 in 3.0.1 and Matlab 2010a but
"error: A(I,J,...) = X: dimensions mismatch" in 3.2.4 and 3.3.54+
geo = [0.6297]
c2 = [0.6562]
ic2 = (c2 < 0.3)
c = [0.8082]
geo (1,ic2) = acos(c(ic2))
this is on a windows build in all three cases.
Also (reported from:
http://octave.1599824.n4.nabble.com/logical-indexing-regression-3-0-1-vs-3-2-4-td3067780.html)
Yes, in a GNU/Linux build in 3.2.4 and current tip. In current tip
(your script reduces to the first two lines):
octave:1> a = 1;
octave:2> a(1, false) = acos ([])
error: A(I,J,...) = X: dimensions mismatch
octave:2> a(1, false) = zeros (0, 0)
error: A(I,J,...) = X: dimensions mismatch
but weirdly:
octave:2> a(1, false) = []
error: A null assignment can only have one non-colon index.
octave:2> a(1, false) = zeros (1, 0)
a = 1
octave:3> a(1, false) = zeros (0, 1)
a = 1
octave:4> a(1, false)
ans = [](1x0)
octave:5>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31764>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #31764] logical indexing regression 3.0.1 vs 3.2.4 (also dev) - differs from Matlab,
jkirby <=