[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45219] Incorrect behavior with broadcasting a
From: |
Michael C. Grant |
Subject: |
[Octave-bug-tracker] [bug #45219] Incorrect behavior with broadcasting and mixed real/complex matrices |
Date: |
Sat, 30 May 2015 19:10:22 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/8.0.6 Safari/600.6.3 |
URL:
<http://savannah.gnu.org/bugs/?45219>
Summary: Incorrect behavior with broadcasting and mixed
real/complex matrices
Project: GNU Octave
Submitted by: mcgrant
Submitted on: Sat 30 May 2015 07:10:20 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Michael Grant
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0-rc4
Operating System: Any
_______________________________________________________
Details:
t1 = randn(6,3)+1j*randn(6,3);
t2 = randn(6,1);
s1 = sparse(t1);
s2 = sparse(t2);
These work fine:
t1 + t2
bsxfun( @plus, t1, t2 )
-verbatim+
These fail, each in different ways, but they should produce the same results
as above, only sparse:
>> s1 + s2
error: operator +: nonconformant arguments (op1 is 6x3, op2 is 6x1)
>> bsxfun(@plus,s1,s2)
error: concatenation operator not implemented for '<unknown type>' by 'sparse
complex matrix' operations
Matlab does the correct thing with the bsxfun functions, but of course it does
not consider the bare additions to be correct.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45219>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45219] Incorrect behavior with broadcasting and mixed real/complex matrices,
Michael C. Grant <=