www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ObtainOffsetsFromCompSensitivityFunctionExample.m

    %% Obtain Offsets from Complementary Sensitivity Function
%%
% Open Simulink model.
mdl = 'watertank';
open_system(mdl)

%%
% Create a linearization option set and set the |StoreOffsets| option.
opt = linearizeOptions('StoreOffsets',true);

%%
% Create |slLinearizer| interface.
sllin = slLinearizer(mdl,opt);

%%
% Add an analysis point at the tank output port.
addPoint(sllin,'watertank/Water-Tank System');

%%
% Calculate the complementary sensitivity function at |y|, and obtain the
% corresponding linearization offsets.
[sys,info] = getCompSensitivity(sllin,'watertank/Water-Tank System');

%%
% View offsets.
info.Offsets