Fixed bug (missing time member).
parent
862b4e1b6c
commit
8328be5b8d
|
@ -39,8 +39,6 @@ function A = minus(B,C)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% 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))
|
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)!'])
|
error(['dynSeries::plus: Cannot add ' inputname(1) ' and ' inputname(2) ' (wrong number of variables)!'])
|
||||||
end
|
end
|
||||||
|
@ -71,6 +69,7 @@ A = dynSeries();
|
||||||
|
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
|
A.time = B.time;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
A.name = repmat({'--NA--'},A.vobs,1);
|
||||||
|
|
|
@ -39,8 +39,6 @@ function A = mrdivide(B,C)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr
|
|
||||||
|
|
||||||
if isa(B,'dynSeries') && isa(C,'dynSeries')
|
if isa(B,'dynSeries') && isa(C,'dynSeries')
|
||||||
% Element by element divisions of two dynSeries object
|
% Element by element divisions of two dynSeries object
|
||||||
if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1))
|
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 = dynSeries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
|
A.time = B.time;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
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.
|
% division of a dynSeries object by a real scalar.
|
||||||
A = dynSeries();
|
A = dynSeries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
|
A.time = B.time;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
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.
|
% division of a real scalar by a dynSeries object.
|
||||||
A = dynSeries();
|
A = dynSeries();
|
||||||
A.freq = C.freq;
|
A.freq = C.freq;
|
||||||
|
A.time = C.time;
|
||||||
A.init = C.init;
|
A.init = C.init;
|
||||||
A.nobs = C.nobs;
|
A.nobs = C.nobs;
|
||||||
A.vobs = C.vobs;
|
A.vobs = C.vobs;
|
||||||
|
|
|
@ -39,8 +39,6 @@ function A = mtimes(B,C)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr
|
|
||||||
|
|
||||||
if isa(B,'dynSeries') && isa(C,'dynSeries')
|
if isa(B,'dynSeries') && isa(C,'dynSeries')
|
||||||
% Element by element multiplication of two dynSeries object
|
% Element by element multiplication of two dynSeries object
|
||||||
if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1))
|
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 = dynSeries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
|
A.time = B.time;
|
||||||
A.nobs = max(B.nobs,C.nobs);
|
A.nobs = max(B.nobs,C.nobs);
|
||||||
A.vobs = max(B.vobs,C.vobs);
|
A.vobs = max(B.vobs,C.vobs);
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
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 = dynSeries();
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
|
A.time = B.time;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
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 = dynSeries();
|
||||||
A.freq = C.freq;
|
A.freq = C.freq;
|
||||||
A.init = C.init;
|
A.init = C.init;
|
||||||
|
A.time = C.time;
|
||||||
A.nobs = C.nobs;
|
A.nobs = C.nobs;
|
||||||
A.vobs = C.vobs;
|
A.vobs = C.vobs;
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
A.name = repmat({'--NA--'},A.vobs,1);
|
||||||
|
|
|
@ -39,14 +39,13 @@ function A = uminus(B)
|
||||||
% You should have received a copy of the GNU General Public License
|
% You should have received a copy of the GNU General Public License
|
||||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
% AUTHOR(S) stephane DOT adjemian AT univ DASH lemans DOT fr
|
|
||||||
|
|
||||||
A = dynSeries();
|
A = dynSeries();
|
||||||
|
|
||||||
A.freq = B.freq;
|
A.freq = B.freq;
|
||||||
A.nobs = B.nobs;
|
A.nobs = B.nobs;
|
||||||
A.vobs = B.vobs;
|
A.vobs = B.vobs;
|
||||||
A.init = B.init;
|
A.init = B.init;
|
||||||
|
A.time = B.time;
|
||||||
A.name = repmat({'--NA--'},A.vobs,1);
|
A.name = repmat({'--NA--'},A.vobs,1);
|
||||||
A.data = -(B.data);
|
A.data = -(B.data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue