[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42773] Operator Overloading not working as ex
From: |
Daniel Keck |
Subject: |
[Octave-bug-tracker] [bug #42773] Operator Overloading not working as expected |
Date: |
Tue, 15 Jul 2014 10:06:10 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0 |
URL:
<http://savannah.gnu.org/bugs/?42773>
Summary: Operator Overloading not working as expected
Project: GNU Octave
Submitted by: dkeck
Submitted on: Di 15 Jul 2014 10:06:09 GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.0
Operating System: Microsoft Windows
_______________________________________________________
Details:
I put the plus.m [1] file into a folder called @cell under Octave root
(/octave-3.8.0/@cell/plus.m) and added the @cell folder to the path.
Create two cell arrays and try to add them with '+' sign for testing:
A = {[1 2 3] [4 5] 6};
B = {5 [4 5] 2};
>>A+B
error: binary operator '+' not implemented for 'cell' by 'cell' operations
As you can see the mapping of the operator to plus.m fails.
For more please see reference [2]
[1]
function C = plus(A,B)
C = cellfun(@plus,A,B,'UniformOutput',false);
end
[2]
http://octave.1599824.n4.nabble.com/Operator-Overloading-not-working-as-expected-td4665479.html
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42773>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42773] Operator Overloading not working as expected,
Daniel Keck <=