%% Uncertain State-Space Model
% To create an uncertain state-space model, you first use Control Design Blocks to create uncertain elements. Then, use the elements to specify the state-space matrices of the system.
% For instance, create three uncertain real parameters and build state-spaces matrices from them.

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];

%
% The matrices constructed with uncertain parameters, A, B, and C, are uncertain matrix (umat) objects. Using them as inputs to ss results in a 2-output, 1-input, 2-state uncertain system.

sys = ss(A,B,C,D)

% The display shows that the system includes the three uncertain parameters.
% Copyright 2012 The MathWorks, Inc.