Commit 5f483c7d authored by MichelJuillard's avatar MichelJuillard
Browse files

the field 'time' was not updated when adding two time series

parent 40f43992
......@@ -75,7 +75,7 @@ if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1))
else
if B.vobs>C.vobs
idB = 1:B.vobs;
idC = ones(1:B.vobs);
idC = ones(1,B.vobs);
elseif B.vobs<C.vobs
idB = ones(1,C.vobs);
idC = 1:C.vobs;
......@@ -116,6 +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;
%@test:1
%$ % Define a datasets.
......
Supports Markdown
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