Rework matlab functions

This commit is contained in:
2021-09-01 09:56:11 +02:00
parent c6d715734f
commit e82e86486e
2 changed files with 11 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
function [H1, H2] = generateCF(W1, W2, args)
% createWeight -
%
% Syntax: [W] = generateCF(args)
% Syntax: [H1, H2] = generateCF(W1, W2, args)
%
% Inputs:
% - W1 - Weighting Function for H1
@@ -14,6 +14,7 @@ function [H1, H2] = generateCF(W1, W2, args)
% - H1 - Generated H1 Filter
% - H2 - Generated H2 Filter
%% Argument validation
arguments
W1
W2
@@ -21,10 +22,13 @@ arguments
args.display char {mustBeMember(args.display,{'on', 'off'})} = 'on'
end
%% The generalized plant is defined
P = [W1 -W1;
0 W2;
1 0];
%% The standard H-infinity synthesis is performed
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', args.method, 'DISPLAY', args.display);
%% H1 is defined as the complementary of H2
H1 = 1 - H2;