Add functions to generate weights and CF
This commit is contained in:
28
matlab/matlab/src/generateCF.m
Normal file
28
matlab/matlab/src/generateCF.m
Normal file
@@ -0,0 +1,28 @@
|
||||
function [H1, H2] = generateCF(W1, W2, args)
|
||||
% createWeight -
|
||||
%
|
||||
% Syntax: [W] = generateCF(args)
|
||||
%
|
||||
% Inputs:
|
||||
% - W1 - Weighting Function for H1
|
||||
% - W2 - Weighting Function for H2
|
||||
% - args -
|
||||
%
|
||||
% Outputs:
|
||||
% - H1 - Generated H1 Filter
|
||||
% - H2 - Generated H2 Filter
|
||||
|
||||
arguments
|
||||
W1
|
||||
W2
|
||||
args.method char {mustBeMember(args.method,{'lmi', 'ric'})} = 'ric'
|
||||
args.display char {mustBeMember(args.display,{'on', 'off'})} = 'on'
|
||||
end
|
||||
|
||||
P = [W1 -W1;
|
||||
0 W2;
|
||||
1 0];
|
||||
|
||||
[H2, ~, gamma, ~] = hinfsyn(P, 1, 1,'TOLGAM', 0.001, 'METHOD', args.method, 'DISPLAY', args.display);
|
||||
|
||||
H1 = 1 - H2;
|
||||
Reference in New Issue
Block a user