function A = mtimes(B,C) % --*-- Unitary tests --*-- %@info: %! @deftypefn {Function File} {@var{A} =} mtimes (@var{B},@var{C}) %! @anchor{@dseries/mtimes} %! @sp 1 %! Overloads the mtimes method for the Dynare time series class (@ref{dseries}). %! @sp 2 %! @strong{Inputs} %! @sp 1 %! @table @ @var %! @item B %! Dynare time series object instantiated by @ref{dseries}. %! @item C %! Dynare time series object instantiated by @ref{dseries}. %! @end table %! @sp 1 %! @strong{Outputs} %! @sp 1 %! @table @ @var %! @item A %! Dynare time series object. %! @end deftypefn %@eod: % Copyright (C) 2012-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 . if isdseries(B) && isdseries(C) % Element by element multiplication of two dseries object if ~isequal(B.vobs,C.vobs) && ~(isequal(B.vobs,1) || isequal(C.vobs,1)) error(['dseries::times: Cannot multiply ' inputname(1) ' and ' inputname(2) ' (wrong number of variables)!']) else if B.vobs>C.vobs idB = 1:B.vobs; idC = ones(1:B.vobs); elseif B.vobs