www.gusucode.com > slcontrol 案例源码程序 matlab代码 > slcontrol/ObtainOffsetsFromIOTransferFunctionExample.m
%% Obtain Offsets from Input/Output Transfer Function %% % Open Simulink model. mdl = 'scdcascade'; 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 analysis points to calculate the closed-loop transfer function. addPoint(sllin,{'r','y1m'}); %% % Calculate the input/output transfer function, and obtain the % corresponding linearization offsets. [sys,info] = getIOTransfer(sllin,'r','y1m'); %% % View offsets. info.Offsets