www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ObtainOffsetsFromSensitivityFunctionExample.m
%% Obtain Offsets from 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 sensitivity function at the analysis point, and obtain the % corresponding linearization offsets. [sys,info] = getSensitivity(sllin,'watertank/Water-Tank System'); %% % View offsets. info.Offsets