Commit 0ac8f4e5 authored by MichelJuillard's avatar MichelJuillard
Browse files

dynSeries: fixed size of 'time' field

parent af62f3e3
......@@ -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;
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment