Commit 6fb4ed93 authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

Fixed bug in multiplication of constant quantities

parent 6ecb69b9
......@@ -1586,7 +1586,8 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
P = (b' * a')';
P.setName(a(1).name + " " + b(1).name);
return
elseif a.isConstant() && b.isConstant()
elseif a.isConstant() && b.isConstant() ...
&& isempty( a(1).domain ) && isempty(b(1).domain)
P = a.on() * b.on();
return
end
......
......@@ -129,9 +129,9 @@ classdef PolynomialOperator < handle & matlab.mixin.Copyable
function C = mtimes(A, B)
% if isnumeric(A) && numel(A) == 1
% A = signals.PolynomialOperator(eye(size(B(1).coefficient, 1)) * A);
% end
if isnumeric(A) && numel(A) == 1
A = signals.PolynomialOperator(eye(size(B(1).coefficient, 1)) * A);
end
%
if ~isa(A, 'signals.PolynomialOperator')
A = signals.PolynomialOperator(A);
......
Supports Markdown
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