Skip to content

Commit 144cd13

Browse files
committed
initial commit for testing operator overloading on RHS
1 parent 3343dab commit 144cd13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/+otp/RHS.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333
obj.(f) = extras.(f);
3434
end
3535
end
36+
37+
function newRHS = plus(obj, other)
38+
objF = obj.F;
39+
otherF = other.F;
40+
newF = @(t, y) objF(t, y) + otherF(t, y);
41+
newRHS = otp.RHS(newF);
42+
end
3643

3744
function opts = odeset(obj, varargin)
3845
opts = odeset( ...

0 commit comments

Comments
 (0)