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
cefbf45a
Commit
cefbf45a
authored
Mar 08, 2013
by
Stéphane Adjemian
Browse files
Fixed bug + Cosmetic changes.
parent
be57a4b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/@dynSeries/merge.m
View file @
cefbf45a
...
...
@@ -50,35 +50,35 @@ A.vobs=length(A.name);
if
B
.
init
>=
C
.
init
diff
=
B
.
init
-
C
.
init
;
A
.
nobs
=
max
(
B
.
nobs
+
diff
,
C
.
nobs
);
A
.
data
=
NaN
(
A
.
nobs
,
A
.
vobs
);
Z1
=
[
NaN
(
diff
,
B
.
vobs
)
;
B
.
data
];
if
A
.
nobs
>
B
.
nobs
+
diff
Z1
=
[
Z1
;
NaN
(
A
.
nobs
-
(
B
.
nobs
+
diff
),
B
.
vobs
)];
end
;
Z2
=
C
.
data
;
if
A
.
nobs
>
C
.
nobs
Z2
=
[
Z2
;
NaN
(
A
.
nobs
-
C
.
nobs
,
C
.
vobs
)];
end
;
A
.
nobs
=
max
(
B
.
nobs
+
diff
,
C
.
nobs
);
A
.
data
=
NaN
(
A
.
nobs
,
A
.
vobs
);
Z1
=
[
NaN
(
diff
,
B
.
vobs
)
;
B
.
data
];
if
A
.
nobs
>
B
.
nobs
+
diff
Z1
=
[
Z1
;
NaN
(
A
.
nobs
-
(
B
.
nobs
+
diff
),
B
.
vobs
)];
end
;
Z2
=
C
.
data
;
if
A
.
nobs
>
C
.
nobs
Z2
=
[
Z2
;
NaN
(
A
.
nobs
-
C
.
nobs
,
C
.
vobs
)];
end
;
Z
=
[
Z1
Z2
];
A
.
data
=
Z
(
:
,
IA
);
A
.
init
=
C
.
init
;
else
diff
=
C
.
init
-
B
.
init
;
A
.
nobs
=
max
(
C
.
nobs
+
diff
,
B
.
nobs
);
A
.
data
=
NaN
(
A
.
nobs
,
A
.
vobs
);
Z1
=
[
NaN
(
diff
,
C
.
vobs
)
;
C
.
data
];
if
A
.
nobs
>
C
.
nobs
+
diff
Z1
=
[
Z1
;
NaN
(
A
.
nobs
-
(
C
.
nobs
+
diff
),
C
.
vobs
)];
end
;
Z2
=
B
.
data
;
if
A
.
nobs
>
B
.
nobs
Z2
=
[
Z2
;
NaN
(
A
.
nobs
-
B
.
nobs
,
B
.
vobs
)];
end
;
Z
=
[
Z
1
Z
2
];
A
.
nobs
=
max
(
C
.
nobs
+
diff
,
B
.
nobs
);
A
.
data
=
NaN
(
A
.
nobs
,
A
.
vobs
);
Z1
=
[
NaN
(
diff
,
C
.
vobs
)
;
C
.
data
];
if
A
.
nobs
>
C
.
nobs
+
diff
Z1
=
[
Z1
;
NaN
(
A
.
nobs
-
(
C
.
nobs
+
diff
),
C
.
vobs
)];
end
;
Z2
=
B
.
data
;
if
A
.
nobs
>
B
.
nobs
Z2
=
[
Z2
;
NaN
(
A
.
nobs
-
B
.
nobs
,
B
.
vobs
)];
end
;
Z
=
[
Z
2
Z
1
];
A
.
data
=
Z
(
:
,
IA
);
A
.
init
=
B
.
init
;
end
;
end
%
@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