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
8051f8ff
Commit
8051f8ff
authored
Oct 04, 2017
by
Stéphane Adjemian
Browse files
Fixed bug. Do not perform inplace modifications when calling vertcat.
parent
0ab5d352
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/@dseries/vertcat.m
View file @
8051f8ff
...
...
@@ -37,9 +37,9 @@ function o = vertcat(varargin) % --*-- Unitary tests --*--
if
nargin
==
0
o
=
dseries
();
elseif
nargin
==
1
o
=
varargin
{
1
};
o
=
copy
(
varargin
{
1
}
)
;
elseif
nargin
>
1
o
=
varargin
{
1
};
o
=
copy
(
varargin
{
1
}
)
;
for
i
=
2
:
nargin
o
=
vertcat_
(
o
,
varargin
{
i
});
end
...
...
@@ -108,7 +108,6 @@ d.dates = [b.dates; c.dates];
%$ T = all(t);
%@eof:1
%@test:2
%$ % Define a data set.
%$ A = [transpose(1:10),2*transpose(1:10)];
...
...
@@ -168,3 +167,23 @@ d.dates = [b.dates; c.dates];
%$ end
%$ T = all(t);
%@eof:3
%@test:4
%$ A = dseries(ones(3, 1), '1990Q1');
%$ B = dseries(2*ones(3, 1), '1990Q4Q3');
%$
%$ try
%$ C = [A; B];
%$ t(1) = true;
%$ catch
%$ t(1) = false;
%$ end
%$
%$ % Check the results.
%$ if t(1)
%$ t(2) = dassert(C.data, [ones(3,1); 2*ones(3,1)]);
%$ t(3) = dassert(A.data, ones(3,1));
%$ t(4) = dassert(B.data, 2*ones(3,1));
%$ end
%$ T = all(t);
%@eof:4
Write
Preview
Markdown
is supported
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