Fixed bug (isscalar does not assume that the input is numeric).

time-shift
Stéphane Adjemian (Scylla) 2013-11-29 18:11:26 +01:00
parent e615f00bec
commit 67d71a628b
1 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ function A = plus(B,C) % --*-- Unitary tests --*--
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if isscalar(B)
if isnumeric(B) && isscalar(B)
if ~isdseries(C)
error('dseries::plus: Second input argument must be a dseries object!')
end
@ -57,7 +57,7 @@ if isscalar(B)
return;
end
if isscalar(C)
if isnumeric(C) && isscalar(C)
if ~isdseries(B)
error('dseries::plus: First input argument must be a dseries object!')
end