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
Sébastien Villemot
dseries
Commits
10740d8a
Commit
10740d8a
authored
Feb 20, 2018
by
Houtan Bastani
Browse files
align: remove extraneous code
parent
0b49e51e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/@dseries/align_.m
View file @
10740d8a
...
...
@@ -11,7 +11,7 @@ function [o, p] = align_(o, p) % --*-- Unitary tests --*--
% - o [dseries]
% - p [dseries]
% Copyright (C) 2013-201
7
Dynare Team
% Copyright (C) 2013-201
8
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -32,28 +32,21 @@ if ~isequal(frequency(o),frequency(p))
error
([
'dseries::align:
''
'
inputname
(
1
)
'
''
and
''
'
inputname
(
2
)
'
''
dseries objects must have common frequencies!'
])
end
init
=
min
(
firstdate
(
o
),
firstdate
(
p
));
last
=
max
(
lastdate
(
o
),
lastdate
(
p
));
if
isempty
(
intersect
(
o
.
dates
,
p
.
dates
))
error
([
'dseries::align:
''
'
inputname
(
1
)
'
''
and
''
'
inputname
(
2
)
'
''
dseries object must have at least one common date!'
])
end
o_init
=
init
;
p_init
=
init
;
o_last
=
last
;
p_last
=
last
;
init
=
min
(
firstdate
(
o
),
firstdate
(
p
));
last
=
max
(
lastdate
(
o
),
lastdate
(
p
));
if
firstdate
(
p
)
>
init
n
=
firstdate
(
p
)
-
init
;
p
.
data
=
[
NaN
(
n
,
vobs
(
p
));
p
.
data
];
p_init
=
init
;
end
if
firstdate
(
o
)
>
init
n
=
firstdate
(
o
)
-
init
;
o
.
data
=
[
NaN
(
n
,
vobs
(
o
));
o
.
data
];
o_init
=
init
;
end
if
lastdate
(
p
)
<
last
...
...
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