%% Evaluate Cost Function Value for Parameter Samples
% Create an arbitrary param.Continuous object.

p = param.Continuous('x',1);

%
% Specify the parameter space definition for the model parameter.

ps = sdo.ParameterSpace(p);

%
% Evaluate the cost function.

[y,info] = sdo.evaluate(@(p) sdoExampleCostFunction(p),ps);

% The software generates three samples (2Np+1), and evaluates the  sdoExampleCostFunction cost function for each sample. Np is the number of parameters ( = 1).
% Copyright 2015 The MathWorks, Inc.