www.gusucode.com > robust 案例源码程序 matlab代码 > robust/PropertiesOfUssObjectsExample.m

    %% Properties of uss Objects
% |uss| models, like all model objects, include properties that store
% dynamics and model metadata. View the properties of an uncertain
% state-space model.
%% 
p1 = ureal('p1',10,'Percentage',50);
p2 = ureal('p2',3,'PlusMinus',[-.5 1.2]);
p3 = ureal('p3',0);
A = [-p1 p2; 0 -p1];
B = [-p2; p2+p3];
C = [1 0; 1 1-p3];
D = [0; 0];
sys = ss(A,B,C,D);     % create uss model

get(sys)
%%
% Most of the properties behave similarly to
% how they behave for |ss| model objects. The |NominalValue|
% property is itslef an |ss| model object. You can therefore analyze the
% nominal value as you would any state-space model. For instance, compute
% the poles and step response of the nominal system. 
pole(sys.NominalValue) 
%% 
step(sys.NominalValue)
%% 
% As with the uncertain matrices (|umat|), the |Uncertainty| property is a
% structure containing the uncertain elements. You can use this property
% for direct access to the uncertain elements. For instance, check the |Range| of the
% uncertain element named |p2| within |sys|.
sys.Uncertainty.p2.Range 
%% 
% Change the uncertainty range of |p2| within |sys|.
sys.Uncertainty.p2.Range = [2 4];
%%
% This command only changes the range of the parameter called |p2| in
% |sys|.  It does not change the variable |p2| in the MATLAB workspace.
p2.Range