%% Specify Sampling Method  

%% 
% Open the model. 
open_system('sdoHydraulicCylinder');  

%% 
% Obtain the parameters from the model. 
p = sdo.getParameterFromModel('sdoHydraulicCylinder',{'Ac','K'});  

%% 
% Create an |sdo.ParameterSpace| object to specify the sample distributions. 
ps = sdo.ParameterSpace(p);  

%% 
% Specify the sampling method as Latin hypercube.
opt = sdo.SampleOptions;
opt.Method = 'lhs'; 
%% 
% Generate 50 samples for the parameters using Latin hypercube sampling. 
x = sdo.sample(ps,50,opt);   



%% 
% Copyright 2012 The MathWorks, Inc.