Commit f3334357 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Merge branch 'master' into maxit

parents 6d71f767 bcc883ed
function y = dynDates2decimal(dd)
% function y = dynDates2decimal(dd)
% returns a vector of doubles with the fractional part corresponding
% to the subperiod. Mostly used for plots.
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
y = dd.time(:,1)+(dd.time(:,2)-1)/dd.freq;
\ No newline at end of file
......@@ -80,16 +80,14 @@ if last_a>last_b
n = last_a-last_b;
b.data = [b.data; NaN(n,b.vobs)];
b.nobs = b.nobs+n;
return
end
if last_a<last_b
elseif last_a<last_b
n = last_b-last_a;
a.data = [a.data; NaN(n,a.vobs)];
a.nobs = a.nobs+n;
return
end
a.time = a.init:a.init+(a.nobs-1);
%@test:1
%$ % Define a datasets.
%$ A = rand(8,3); B = rand(7,2);
......
......@@ -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...
......
......@@ -19,5 +19,5 @@ function s = getName(o)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(~isempty(o.data) && size(o.data, 2) == 1);
s = o.data(1).name();
s = o.data.name;
end
\ No newline at end of file
......@@ -19,5 +19,5 @@ function s = getTexName(o)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(~isempty(o.data) && size(o.data, 2) == 1);
s = o.data(1).tex();
s = o.data.tex;
end
\ No newline at end of file
......@@ -11,6 +11,7 @@
*.dat
*.prn
*_simul
*-macroexp.mod
wsOct
/run_test_octave_output.txt
......
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