%% Set Distribution of Parameters in Parameter Space
% Create an sdo.ParameterSpace object for the Ac and K parameters of sdoHydraulicCylinder model.

load_system('sdoHydraulicCylinder');
p = sdo.getParameterFromModel('sdoHydraulicCylinder',{'Ac','K'});
ps = sdo.ParameterSpace(p);

%
% By default, a uniform distribution is specified for all parameters in p.

ps.ParameterDistributions

%
% Specify a normal distribution for Ac and K.

pAcdist = makedist('Normal','mu',p(1).Value,'sigma',1);
pKdist = makedist('Normal','mu',p(2).Value,'sigma',3);
ps = setDistribution(ps,p,[pAcdist;pKdist]);

% Copyright 2015 The MathWorks, Inc.