dynSeries: fixed size of 'time' field

time-shift
Michel Juillard 2013-10-09 12:29:45 +02:00
parent af62f3e35d
commit 0ac8f4e5b1
5 changed files with 5 additions and 6 deletions

View File

@ -95,7 +95,7 @@ end
ts.data = tmp(K+1:end-K,:);
ts.nobs = ts.nobs-2*K;
ts.init = ts.init+K;
ts.time = ts.init:ts.init+ts.nobs;
ts.time = ts.init:ts.init+(ts.nobs-1);
%@test:1
%$ plot_flag = 0;

View File

@ -146,7 +146,6 @@ switch nargin
[ts.nobs, ts.vobs] = size(ts.data);
ts.freq = 1;
ts.init = dynDate(1);
ts.time = ts.init:ts.init+ts.nobs;
ts.name = default_name(ts.vobs);
ts.tex = name2tex(ts.name);
end
@ -212,7 +211,7 @@ switch nargin
error('dynSeries::dynSeries: Can''t instantiate the class, wrong calling sequence!')
end
ts.time = ts.init:(ts.init+ts.nobs);
ts.time = ts.init:ts.init+(ts.nobs-1);
%@test:1
%$ % Test if we can instantiate an empty dynSeries object.

View File

@ -83,7 +83,7 @@ else
A.init = B.init;
end
A.time = A.init:A.init+A.nobs;
A.time = A.init:A.init+(A.nobs-1);
%@test:1
%$ % Define a datasets.

View File

@ -116,7 +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;
A.time = A.init:A.init+(A.nobs-1);
%@test:1
%$ % Define a datasets.

View File

@ -103,7 +103,7 @@ switch length(S)
A.init = B;
% ... and update freq and time members.
A.freq = A.init.freq;
A.time = A.init:(A.init+(A.nobs-1));
A.time = A.init:A.init+(A.nobs-1);
return
elseif isequal(S(1).subs,'time') && isa(B,'dynDates')
% Overwrite the time member...