Skip to content

Commit

Permalink
fix tf plus, minus operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelson-numerical-software committed Oct 17, 2023
1 parent fd25e02 commit 02d8f4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modules/control_system/functions/@tf/minus.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
% LICENCE_BLOCK_END
%=============================================================================
function sys = minus(sysA, sysB)
sys_tfA = tf(sysA);
sys_tfB = tf(sysB);
if ~issiso(sysA) || ~issiso(sysA)
sysA = tf(sysA);
sysB = tf(sysB);
if ~issiso(sysA) || ~issiso(sysB)
error(_('SISO lti expected.'));
end

Expand Down
7 changes: 3 additions & 4 deletions modules/control_system/functions/@tf/plus.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
% LICENCE_BLOCK_END
%=============================================================================
function sys = plus(sysA, sysB)
sys_tfA = tf(sysA);
sys_tfB = tf(sysB);
if ~issiso(sysA) || ~issiso(sysA)
sysA = tf(sysA);
sysB = tf(sysB);
if ~issiso(sysA) || ~issiso(sysB)
error(_('SISO lti expected.'));
end

Expand Down Expand Up @@ -39,7 +39,6 @@
if ~isempty(UserData)
sys.UserData = UserData;
end

end
%=============================================================================
function sys = plus_siso(sysA, sysB)
Expand Down

0 comments on commit 02d8f4c

Please sign in to comment.