Error model(s), specified as a character vector, string, function handle, string vector, cell
array of character vectors, or cell array containing a mixture of character
vectors and function handles.
If it is a string vector or cell array, its length must match the number of columns
(responses) in sd
, and each error model is applied to
the corresponding column in sd
. If it is a single
character vector, string, or function handle, the same error model is
applied to all columns in sd
.
The first argument of a function handle must be a matrix of
simulation results. The subsequent arguments are the parameters of
the error model supplied in the errorparam
input
argument. The output of the function handle must be a matrix of the
same size as the first input argument (simulation results).
For example, suppose you have a custom error model with a standard
mean-zero and unit-variance (Gaussian) normal variable e,
simulation results f, and two parameters p1 and p2: . You can define the corresponding
function handle as follows.
em = @(y,p1,p2) y+p1+p2*randn(size(y));
where
y
is
the matrix of simulation results and
p1
and
p2
are
the error parameters. The output of the function handle must be the
same size as
y
, which is the same as the simulation
results specified in the
sd
input argument. The
parameters
p1
and
p2
are specified
in the
errorparam
argument.
There are four built-in error models. Each model defines the
error using a standard mean-zero and unit-variance (Gaussian) variable e,
simulation results f, and one or two parameters a and b.
The models are:
'constant'
:
'proportional'
:
'combined'
:
'exponential'
: