Renamed time member as dates (in dseries class) to avoid confusion with dates class' time member.
parent
805d4dda67
commit
fbb38d5576
|
@ -86,7 +86,7 @@ elseif last_a<last_b
|
||||||
a.nobs = a.nobs+n;
|
a.nobs = a.nobs+n;
|
||||||
end
|
end
|
||||||
|
|
||||||
a.time = a.init:a.init+(a.nobs-1);
|
a.dates = a.init:a.init+(a.nobs-1);
|
||||||
|
|
||||||
%@test:1
|
%@test:1
|
||||||
%$ % Define a datasets.
|
%$ % Define a datasets.
|
||||||
|
|
|
@ -95,7 +95,7 @@ end
|
||||||
ts.data = tmp(K+1:end-K,:);
|
ts.data = tmp(K+1:end-K,:);
|
||||||
ts.nobs = ts.nobs-2*K;
|
ts.nobs = ts.nobs-2*K;
|
||||||
ts.init = ts.init+K;
|
ts.init = ts.init+K;
|
||||||
ts.time = ts.init:ts.init+(ts.nobs-1);
|
ts.dates = ts.init:ts.init+(ts.nobs-1);
|
||||||
|
|
||||||
%@test:1
|
%@test:1
|
||||||
%$ plot_flag = 0;
|
%$ plot_flag = 0;
|
||||||
|
@ -131,7 +131,7 @@ ts.time = ts.init:ts.init+(ts.nobs-1);
|
||||||
%$
|
%$
|
||||||
%$ % Show results
|
%$ % Show results
|
||||||
%$ if plot_flag
|
%$ if plot_flag
|
||||||
%$ plot(xx(ts.time).data,'-k');
|
%$ plot(xx(ts.dates).data,'-k');
|
||||||
%$ hold on
|
%$ hold on
|
||||||
%$ plot(ts.data,'--r');
|
%$ plot(ts.data,'--r');
|
||||||
%$ hold off
|
%$ hold off
|
||||||
|
|
|
@ -69,7 +69,7 @@ if ~isequal(numel(unique(A.name)),numel(A.name));
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ~isequal(numel(unique(A.tex)),numel(A.tex));
|
if ~isequa(numel(unique(A.tex)),numel(A.tex));
|
||||||
error_flag = 1;
|
error_flag = 1;
|
||||||
if nargout>1
|
if nargout>1
|
||||||
message = ['dseries: The variable tex names in dseries object ''' inputname(1) ''' are not unique!']:
|
message = ['dseries: The variable tex names in dseries object ''' inputname(1) ''' are not unique!']:
|
||||||
|
@ -77,7 +77,7 @@ if ~isequal(numel(unique(A.tex)),numel(A.tex));
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ~isequal(A.time,A.init:A.init+A.nobs)
|
if ~isequal(A.dates,A.init:A.init+A.nobs)
|
||||||
error_flag = 1;
|
error_flag = 1;
|
||||||
if nargout>1
|
if nargout>1
|
||||||
message = ['dseries: Wrong definition of the time member in dseries object ''' inputname(1) '''!']:
|
message = ['dseries: Wrong definition of the time member in dseries object ''' inputname(1) '''!']:
|
||||||
|
|
|
@ -64,7 +64,7 @@ switch nargin
|
||||||
B.data = bsxfun(@plus,B.data,varargin{2}.data);
|
B.data = bsxfun(@plus,B.data,varargin{2}.data);
|
||||||
elseif isdates(varargin{2})
|
elseif isdates(varargin{2})
|
||||||
B = cumsum(varargin{1});
|
B = cumsum(varargin{1});
|
||||||
t = find(B.time==varargin{2});
|
t = find(B.dates==varargin{2});
|
||||||
if isempty(t)
|
if isempty(t)
|
||||||
if varargin{2}==(B.init-1)
|
if varargin{2}==(B.init-1)
|
||||||
return
|
return
|
||||||
|
@ -93,7 +93,7 @@ switch nargin
|
||||||
error('dseries::cumsum: Third input argument must be a dseries object with only one observation!')
|
error('dseries::cumsum: Third input argument must be a dseries object with only one observation!')
|
||||||
end
|
end
|
||||||
B = cumsum(varargin{1});
|
B = cumsum(varargin{1});
|
||||||
t = find(B.time==varargin{2});
|
t = find(B.dates==varargin{2});
|
||||||
if isempty(t)
|
if isempty(t)
|
||||||
if varargin{2}==(B.init-1)
|
if varargin{2}==(B.init-1)
|
||||||
B.data = bsxfun(@plus,B.data,varargin{3}.data);
|
B.data = bsxfun(@plus,B.data,varargin{3}.data);
|
||||||
|
|
|
@ -23,7 +23,7 @@ separator = repmat(' | ',A.nobs+1,1);
|
||||||
vspace = ' ';
|
vspace = ' ';
|
||||||
TABLE = ' ';
|
TABLE = ' ';
|
||||||
for t=1:A.nobs
|
for t=1:A.nobs
|
||||||
TABLE = char(TABLE, format(A.time(t)));
|
TABLE = char(TABLE, format(A.dates(t)));
|
||||||
end
|
end
|
||||||
for i = 1:A.vobs
|
for i = 1:A.vobs
|
||||||
TABLE = horzcat(TABLE,separator);
|
TABLE = horzcat(TABLE,separator);
|
||||||
|
|
|
@ -24,7 +24,7 @@ TABLE = ' ';
|
||||||
if A.nobs<=40
|
if A.nobs<=40
|
||||||
separator = repmat(' | ',A.nobs+1,1);
|
separator = repmat(' | ',A.nobs+1,1);
|
||||||
for t=1:A.nobs
|
for t=1:A.nobs
|
||||||
TABLE = char(TABLE, date2string(A.time(t)));
|
TABLE = char(TABLE, date2string(A.dates(t)));
|
||||||
end
|
end
|
||||||
for i = 1:A.vobs
|
for i = 1:A.vobs
|
||||||
TABLE = horzcat(TABLE,separator);
|
TABLE = horzcat(TABLE,separator);
|
||||||
|
@ -38,11 +38,11 @@ else
|
||||||
n = 10;
|
n = 10;
|
||||||
separator = repmat(' | ',2*n+3,1);
|
separator = repmat(' | ',2*n+3,1);
|
||||||
for t=1:n
|
for t=1:n
|
||||||
TABLE = char(TABLE, date2string(A.time(t)));
|
TABLE = char(TABLE, date2string(A.dates(t)));
|
||||||
end
|
end
|
||||||
TABLE = char(TABLE,vspace);
|
TABLE = char(TABLE,vspace);
|
||||||
for t = A.nobs-n:A.nobs
|
for t = A.nobs-n:A.nobs
|
||||||
TABLE = char(TABLE, date2string(A.time(t)));
|
TABLE = char(TABLE, date2string(A.dates(t)));
|
||||||
end
|
end
|
||||||
for i=1:A.vobs
|
for i=1:A.vobs
|
||||||
TABLE = horzcat(TABLE,separator);
|
TABLE = horzcat(TABLE,separator);
|
||||||
|
|
|
@ -85,7 +85,7 @@ ts.name = {};
|
||||||
ts.tex = {};
|
ts.tex = {};
|
||||||
ts.freq = [];
|
ts.freq = [];
|
||||||
ts.init = dates();
|
ts.init = dates();
|
||||||
ts.time = dates();
|
ts.dates = dates();
|
||||||
|
|
||||||
ts = class(ts,'dseries');
|
ts = class(ts,'dseries');
|
||||||
|
|
||||||
|
@ -94,16 +94,16 @@ switch nargin
|
||||||
% Create an empty dseries object.
|
% Create an empty dseries object.
|
||||||
return
|
return
|
||||||
case 1
|
case 1
|
||||||
if isa(varargin{1},'dates') && isequal(length(varargin{1}),1)
|
if isa(varargin{1},'dates')
|
||||||
switch length(varargin{1})
|
switch length(varargin{1})
|
||||||
case 0
|
case 0
|
||||||
error(['dseries::dseries: ' inputname(1) ' (identified as a dates object) must be non empty!'])
|
error(['dseries::dseries: Input ' inputname(1) ' (identified as a dates object) must be non empty!'])
|
||||||
case 1
|
case 1
|
||||||
% Create an empty dseries object with an initial date.
|
% Create an empty dseries object with an initial date.
|
||||||
ts.init = varargin{1};
|
ts.init = varargin{1};
|
||||||
ts.freq = varargin{1}.freq;
|
ts.freq = varargin{1}.freq;
|
||||||
otherwise
|
otherwise
|
||||||
error(['dseries::dseries: ' inputname(1) ' (identified as a dates object) must have only one element!'])
|
error(['dseries::dseries: Input ' inputname(1) ' (identified as a dates object) must have only one element!'])
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
elseif ischar(varargin{1})
|
elseif ischar(varargin{1})
|
||||||
|
@ -214,7 +214,7 @@ switch nargin
|
||||||
error('dseries::dseries: Can''t instantiate the class, wrong calling sequence!')
|
error('dseries::dseries: Can''t instantiate the class, wrong calling sequence!')
|
||||||
end
|
end
|
||||||
|
|
||||||
ts.time = ts.init:ts.init+(ts.nobs-1);
|
ts.dates = ts.init:ts.init+(ts.nobs-1);
|
||||||
|
|
||||||
%@test:1
|
%@test:1
|
||||||
%$ % Test if we can instantiate an empty dseries object.
|
%$ % Test if we can instantiate an empty dseries object.
|
||||||
|
|
|
@ -122,7 +122,7 @@ for i = 1:length(idVariableName)
|
||||||
end
|
end
|
||||||
|
|
||||||
A.data = B.data(:,idVariableName);
|
A.data = B.data(:,idVariableName);
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
|
|
|
@ -76,7 +76,7 @@ function a = concatenate(b,c)
|
||||||
if ~( d_nobs_flag(1) || d_init_flag(1) )
|
if ~( d_nobs_flag(1) || d_init_flag(1) )
|
||||||
a.init = b.init;
|
a.init = b.init;
|
||||||
a.data = [b.data,c.data];
|
a.data = [b.data,c.data];
|
||||||
a.time = b.time;
|
a.dates = b.dates;
|
||||||
else
|
else
|
||||||
if b.init<=c.init
|
if b.init<=c.init
|
||||||
a.init = b.init;
|
a.init = b.init;
|
||||||
|
@ -96,7 +96,7 @@ function a = concatenate(b,c)
|
||||||
c.data = [c.data; NaN(b_last_date-c_last_date,c.vobs)];
|
c.data = [c.data; NaN(b_last_date-c_last_date,c.vobs)];
|
||||||
end
|
end
|
||||||
a.data = [b.data, c.data];
|
a.data = [b.data, c.data];
|
||||||
a.time = unique([b.time, c.time]);
|
a.dates = unique([b.dates, c.dates]);
|
||||||
end
|
end
|
||||||
a.nobs = size(a.data,1);
|
a.nobs = size(a.data,1);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ function a = concatenate(b,c)
|
||||||
%$ B_name = {'B1';'B2'};
|
%$ B_name = {'B1';'B2'};
|
||||||
%$
|
%$
|
||||||
%$ % Define expected results.
|
%$ % Define expected results.
|
||||||
%$ e.time = dates(1,1);
|
%$ e.init = dates(1,1);
|
||||||
%$ e.freq = 1;
|
%$ e.freq = 1;
|
||||||
%$ e.name = {'A1';'A2';'B1';'B2'};
|
%$ e.name = {'A1';'A2';'B1';'B2'};
|
||||||
%$ e.data = [A,B];
|
%$ e.data = [A,B];
|
||||||
|
@ -124,7 +124,7 @@ function a = concatenate(b,c)
|
||||||
%$
|
%$
|
||||||
%$ % Check the results.
|
%$ % Check the results.
|
||||||
%$
|
%$
|
||||||
%$ t(1) = dyn_assert(isequal(ts3.init,e.time),1);
|
%$ t(1) = dyn_assert(isequal(ts3.init,e.init),1);
|
||||||
%$ t(2) = dyn_assert(ts3.freq,e.freq);
|
%$ t(2) = dyn_assert(ts3.freq,e.freq);
|
||||||
%$ t(3) = dyn_assert(ts3.data,e.data);
|
%$ t(3) = dyn_assert(ts3.data,e.data);
|
||||||
%$ t(4) = dyn_assert(ts3.name,e.name);
|
%$ t(4) = dyn_assert(ts3.name,e.name);
|
||||||
|
@ -145,7 +145,6 @@ function a = concatenate(b,c)
|
||||||
%$ B_init = 2005;
|
%$ B_init = 2005;
|
||||||
%$
|
%$
|
||||||
%$ % Define expected results.
|
%$ % Define expected results.
|
||||||
%$ e.time = [transpose(2000+(1:12)), ones(12,1)];
|
|
||||||
%$ e.init = dates('2001Y');
|
%$ e.init = dates('2001Y');
|
||||||
%$ e.freq = 1;
|
%$ e.freq = 1;
|
||||||
%$ e.name = {'A1';'A2';'B1';'B2'};
|
%$ e.name = {'A1';'A2';'B1';'B2'};
|
||||||
|
|
|
@ -37,6 +37,4 @@ function b = isempty(A)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr
|
|
||||||
|
|
||||||
b = isempty(A.data) && isequal(A.nobs,0) && isequal(A.vobs,0);
|
b = isempty(A.data) && isequal(A.nobs,0) && isequal(A.vobs,0);
|
|
@ -44,7 +44,7 @@ if isnumeric(B) && isreal(B) && isequal(length(B),1) && isa(C,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = C.freq;
|
A.freq = C.freq;
|
||||||
A.init = C.init;
|
A.init = C.init;
|
||||||
A.time = C.time;
|
A.dates = C.dates;
|
||||||
A.nobs = C.nobs;
|
A.nobs = C.nobs;
|
||||||
A.vobs = C.vobs;
|
A.vobs = C.vobs;
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
@ -61,7 +61,7 @@ if isnumeric(C) && isreal(C) && isequal(length(C),1) && isa(B,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
@ -111,7 +111,7 @@ A = dseries();
|
||||||
|
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
|
|
@ -65,7 +65,7 @@ if isa(B,'dseries') && isa(C,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
@ -79,7 +79,7 @@ elseif isnumeric(C) && isreal(C) && isequal(length(C),1) && isa(B,'dseries')
|
||||||
% division of a dseries object by a real scalar.
|
% division of a dseries object by a real scalar.
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
|
@ -94,7 +94,7 @@ elseif isnumeric(B) && isreal(B) && isequal(length(B),1) && isa(C,'dseries')
|
||||||
% division of a real scalar by a dseries object.
|
% division of a real scalar by a dseries object.
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = C.freq;
|
A.freq = C.freq;
|
||||||
A.time = C.time;
|
A.dates = C.dates;
|
||||||
A.init = C.init;
|
A.init = C.init;
|
||||||
A.nobs = C.nobs;
|
A.nobs = C.nobs;
|
||||||
A.vobs = C.vobs;
|
A.vobs = C.vobs;
|
||||||
|
|
|
@ -65,7 +65,7 @@ if isa(B,'dseries') && isa(C,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
@ -80,7 +80,7 @@ elseif isnumeric(C) && isreal(C) && isequal(length(C),1) && isa(B,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
@ -95,7 +95,7 @@ elseif isnumeric(B) && isreal(B) && isequal(length(B),1) && isa(C,'dseries')
|
||||||
A = dseries();
|
A = dseries();
|
||||||
A.freq = C.freq;
|
A.freq = C.freq;
|
||||||
A.init = C.init;
|
A.init = C.init;
|
||||||
A.time = C.time;
|
A.dates = C.dates;
|
||||||
A.nobs = C.nobs;
|
A.nobs = C.nobs;
|
||||||
A.vobs = C.vobs;
|
A.vobs = C.vobs;
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
|
|
|
@ -43,9 +43,9 @@ function A = plus(B,C) % --*-- Unitary tests --*--
|
||||||
if isscalar(B)
|
if isscalar(B)
|
||||||
assert(isa(C, 'dseries'));
|
assert(isa(C, 'dseries'));
|
||||||
b(1:size(C)) = B;
|
b(1:size(C)) = B;
|
||||||
BB = dseries(b, C.time(1));
|
BB = dseries(b, C.dates(1));
|
||||||
BB.freq = C.freq;
|
BB.freq = C.freq;
|
||||||
BB.time = C.time;
|
BB.dates = C.dates;
|
||||||
BB.nobs = C.nobs;
|
BB.nobs = C.nobs;
|
||||||
BB.vobs = C.vobs;
|
BB.vobs = C.vobs;
|
||||||
BB.name = cell(BB.vobs,1);
|
BB.name = cell(BB.vobs,1);
|
||||||
|
@ -58,9 +58,9 @@ end
|
||||||
if isscalar(C)
|
if isscalar(C)
|
||||||
assert(isa(B, 'dseries'));
|
assert(isa(B, 'dseries'));
|
||||||
c(1:size(C)) = C;
|
c(1:size(C)) = C;
|
||||||
CC = dseries(C, B.time(1));
|
CC = dseries(C, B.dates(1));
|
||||||
CC.freq = B.freq;
|
CC.freq = B.freq;
|
||||||
CC.time = B.time;
|
CC.dates = B.dates;
|
||||||
CC.nobs = B.nobs;
|
CC.nobs = B.nobs;
|
||||||
CC.vobs = B.vobs;
|
CC.vobs = B.vobs;
|
||||||
CC.name = cell(CC.vobs,1);
|
CC.name = cell(CC.vobs,1);
|
||||||
|
@ -116,7 +116,7 @@ for i=1:A.vobs
|
||||||
A.tex(i) = {['(' B.tex{idB(i)} '+' C.tex{idC(i)} ')']};
|
A.tex(i) = {['(' B.tex{idB(i)} '+' C.tex{idC(i)} ')']};
|
||||||
end
|
end
|
||||||
A.data = bsxfun(@plus,B.data,C.data);
|
A.data = bsxfun(@plus,B.data,C.data);
|
||||||
A.time = A.init:A.init+(A.nobs-1);
|
A.dates = A.init:A.init+(A.nobs-1);
|
||||||
|
|
||||||
%@test:1
|
%@test:1
|
||||||
%$ % Define a datasets.
|
%$ % Define a datasets.
|
||||||
|
|
|
@ -82,9 +82,8 @@ switch format
|
||||||
fprintf(fid,',%s', A.name{:});
|
fprintf(fid,',%s', A.name{:});
|
||||||
fprintf(fid,'\n');
|
fprintf(fid,'\n');
|
||||||
for t=1:A.nobs
|
for t=1:A.nobs
|
||||||
date = A.init+(t-1);
|
|
||||||
str = sprintf(', %15.8g',A.data(t,:));
|
str = sprintf(', %15.8g',A.data(t,:));
|
||||||
fprintf(fid, '%s%s\n',date2string(date),str);
|
fprintf(fid, '%s%s\n',date2string(A.dates(t)),str);
|
||||||
end
|
end
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
end
|
end
|
||||||
|
|
|
@ -46,7 +46,7 @@ A.freq = B.freq;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.time = B.time;
|
A.dates = B.dates;
|
||||||
A.name = cell(A.vobs,1);
|
A.name = cell(A.vobs,1);
|
||||||
A.tex = cell(A.vobs,1);
|
A.tex = cell(A.vobs,1);
|
||||||
for i = 1:A.vobs
|
for i = 1:A.vobs
|
||||||
|
|
|
@ -86,7 +86,7 @@ end
|
||||||
%$ B_name = {'A1';'A2'};
|
%$ B_name = {'A1';'A2'};
|
||||||
%$
|
%$
|
||||||
%$ % Define expected results.
|
%$ % Define expected results.
|
||||||
%$ e.time = dates(1,1);
|
%$ e.init = dates(1,1);
|
||||||
%$ e.freq = 1;
|
%$ e.freq = 1;
|
||||||
%$ e.name = {'A1';'A2'};
|
%$ e.name = {'A1';'A2'};
|
||||||
%$ e.data = [A;B];
|
%$ e.data = [A;B];
|
||||||
|
@ -100,7 +100,7 @@ end
|
||||||
%$
|
%$
|
||||||
%$ % Check the results.
|
%$ % Check the results.
|
||||||
%$
|
%$
|
||||||
%$ t(1) = dyn_assert(isequal(ts3.init,e.time),1);
|
%$ t(1) = dyn_assert(isequal(ts3.init,e.init),1);
|
||||||
%$ t(2) = dyn_assert(ts3.freq,e.freq);
|
%$ t(2) = dyn_assert(ts3.freq,e.freq);
|
||||||
%$ t(3) = dyn_assert(ts3.data,e.data);
|
%$ t(3) = dyn_assert(ts3.data,e.data);
|
||||||
%$ t(4) = dyn_assert(ts3.name,e.name);
|
%$ t(4) = dyn_assert(ts3.name,e.name);
|
||||||
|
@ -121,7 +121,7 @@ end
|
||||||
%$ C_name = {'A1';'A2'};
|
%$ C_name = {'A1';'A2'};
|
||||||
%$
|
%$
|
||||||
%$ % Define expected results.
|
%$ % Define expected results.
|
||||||
%$ e.time = dates(1,1);
|
%$ e.init = dates(1,1);
|
||||||
%$ e.freq = 1;
|
%$ e.freq = 1;
|
||||||
%$ e.name = {'A1';'A2'};
|
%$ e.name = {'A1';'A2'};
|
||||||
%$ e.data = [A;B;C];
|
%$ e.data = [A;B;C];
|
||||||
|
@ -136,7 +136,7 @@ end
|
||||||
%$
|
%$
|
||||||
%$ % Check the results.
|
%$ % Check the results.
|
||||||
%$
|
%$
|
||||||
%$ t(1) = dyn_assert(isequal(ts4.init,e.time),1);
|
%$ t(1) = dyn_assert(isequal(ts4.init,e.init),1);
|
||||||
%$ t(2) = dyn_assert(ts4.freq,e.freq);
|
%$ t(2) = dyn_assert(ts4.freq,e.freq);
|
||||||
%$ t(3) = dyn_assert(ts4.data,e.data);
|
%$ t(3) = dyn_assert(ts4.data,e.data);
|
||||||
%$ t(4) = dyn_assert(ts4.name,e.name);
|
%$ t(4) = dyn_assert(ts4.name,e.name);
|
||||||
|
|
Loading…
Reference in New Issue