From 8328be5b8d0c1466ca94581cea4bc59d7c851dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Ulysses=29?= Date: Thu, 14 Mar 2013 18:27:27 +0100 Subject: [PATCH] Fixed bug (missing time member). --- matlab/@dynSeries/minus.m | 3 +-- matlab/@dynSeries/mrdivide.m | 5 +++-- matlab/@dynSeries/mtimes.m | 5 +++-- matlab/@dynSeries/uminus.m | 3 +-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/matlab/@dynSeries/minus.m b/matlab/@dynSeries/minus.m index 271a7b171..1ceb08a35 100644 --- a/matlab/@dynSeries/minus.m +++ b/matlab/@dynSeries/minus.m @@ -39,8 +39,6 @@ function A = minus(B,C) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr - if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1)) error(['dynSeries::plus: Cannot add ' inputname(1) ' and ' inputname(2) ' (wrong number of variables)!']) end @@ -71,6 +69,7 @@ A = dynSeries(); A.freq = B.freq; A.init = B.init; +A.time = B.time; A.nobs = max(B.nobs,C.nobs); A.vobs = max(B.vobs,C.vobs); A.name = repmat({'--NA--'},A.vobs,1); diff --git a/matlab/@dynSeries/mrdivide.m b/matlab/@dynSeries/mrdivide.m index e75144b86..adcff27e5 100644 --- a/matlab/@dynSeries/mrdivide.m +++ b/matlab/@dynSeries/mrdivide.m @@ -39,8 +39,6 @@ function A = mrdivide(B,C) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr - if isa(B,'dynSeries') && isa(C,'dynSeries') % Element by element divisions of two dynSeries object if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1)) @@ -58,6 +56,7 @@ if isa(B,'dynSeries') && isa(C,'dynSeries') A = dynSeries(); A.freq = B.freq; A.init = B.init; + A.time = B.time; A.nobs = max(B.nobs,C.nobs); A.vobs = max(B.vobs,C.vobs); A.name = repmat({'--NA--'},A.vobs,1); @@ -67,6 +66,7 @@ elseif isnumeric(C) && isreal(C) && isequal(length(C),1) && isa(B,'dynSeries') % division of a dynSeries object by a real scalar. A = dynSeries(); A.freq = B.freq; + A.time = B.time; A.init = B.init; A.nobs = B.nobs; A.vobs = B.vobs; @@ -77,6 +77,7 @@ elseif isnumeric(B) && isreal(B) && isequal(length(B),1) && isa(C,'dynSeries') % division of a real scalar by a dynSeries object. A = dynSeries(); A.freq = C.freq; + A.time = C.time; A.init = C.init; A.nobs = C.nobs; A.vobs = C.vobs; diff --git a/matlab/@dynSeries/mtimes.m b/matlab/@dynSeries/mtimes.m index 2ae3c52b4..1668de811 100644 --- a/matlab/@dynSeries/mtimes.m +++ b/matlab/@dynSeries/mtimes.m @@ -39,8 +39,6 @@ function A = mtimes(B,C) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr - if isa(B,'dynSeries') && isa(C,'dynSeries') % Element by element multiplication of two dynSeries object if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1)) @@ -58,6 +56,7 @@ if isa(B,'dynSeries') && isa(C,'dynSeries') A = dynSeries(); A.freq = B.freq; A.init = B.init; + A.time = B.time; A.nobs = max(B.nobs,C.nobs); A.vobs = max(B.vobs,C.vobs); A.name = repmat({'--NA--'},A.vobs,1); @@ -68,6 +67,7 @@ elseif isnumeric(C) && isreal(C) && isequal(length(C),1) && isa(B,'dynSeries') A = dynSeries(); A.freq = B.freq; A.init = B.init; + A.time = B.time; A.nobs = B.nobs; A.vobs = B.vobs; A.name = repmat({'--NA--'},A.vobs,1); @@ -78,6 +78,7 @@ elseif isnumeric(B) && isreal(B) && isequal(length(B),1) && isa(C,'dynSeries') A = dynSeries(); A.freq = C.freq; A.init = C.init; + A.time = C.time; A.nobs = C.nobs; A.vobs = C.vobs; A.name = repmat({'--NA--'},A.vobs,1); diff --git a/matlab/@dynSeries/uminus.m b/matlab/@dynSeries/uminus.m index 4c7aeccd9..d5ec2222c 100644 --- a/matlab/@dynSeries/uminus.m +++ b/matlab/@dynSeries/uminus.m @@ -39,14 +39,13 @@ function A = uminus(B) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see . -% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr - A = dynSeries(); A.freq = B.freq; A.nobs = B.nobs; A.vobs = B.vobs; A.init = B.init; +A.time = B.time; A.name = repmat({'--NA--'},A.vobs,1); A.data = -(B.data);