Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
5f483c7d
Commit
5f483c7d
authored
Oct 07, 2013
by
MichelJuillard
Browse files
the field 'time' was not updated when adding two time series
parent
40f43992
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynSeries/plus.m
View file @
5f483c7d
...
...
@@ -75,7 +75,7 @@ if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1))
else
if
B
.
vobs
>
C
.
vobs
idB
=
1
:
B
.
vobs
;
idC
=
ones
(
1
:
B
.
vobs
);
idC
=
ones
(
1
,
B
.
vobs
);
elseif
B
.
vobs
<
C
.
vobs
idB
=
ones
(
1
,
C
.
vobs
);
idC
=
1
:
C
.
vobs
;
...
...
@@ -116,6 +116,7 @@ for i=1:A.vobs
A
.
tex
(
i
)
=
{[
'('
B
.
tex
{
idB
(
i
)}
'+'
C
.
tex
{
idC
(
i
)}
')'
]
}
;
end
A
.
data
=
bsxfun
(
@plus
,
B
.
data
,
C
.
data
);
A
.
time
=
A
.
init
:
A
.
init
+
A
.
nobs
;
%
@test
:
1
%
$
%
Define
a
datasets
.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment