%% Specify Algorithm and Display for H-Infinity Synthesis
% Use the LMI-based algorithm to compute an H_{\infty }-optimal controller for a plant with one control signal and two measurement signals. Turn on the display that shows the progress of the computation.
% Load the plant, and specify the numbers of measurements and controls.

load hinfsynExData P
ncont = 1; 
nmeas = 2; 

%
% Create an options set for hinfsyn that specifies the LMI-based algorithm and turns on the display.

opts = hinfsynOptions('Method','LMI','Display','on');

%
% Alternatively, start with the default options set, and use dot notation to change option values.

opts = hinfsynOptions;
opts.Method = 'LMI';
opts.Display = 'on';

%
% Compute the controller.

[K,CL,gamma] = hinfsyn(P,nmeas,ncont,opts);

%
% Copyright 2018 The MathWorks, Inc.