Use the function mphmean to evaluate the average of a given expression over inner solution lists. To evaluate the mean of the expressions
e1,... use the command
mphmean:
where edim is a string to define the element entity dimension:
'volume',
'surface', or
'line'.
edim can also be a positive integer (
3,
2, or
1 respectively). The output variables
d1,... are an NxP array where N is the number of inner solutions and P the number of outer solutions.
The function mphmean supports the following properties to set the data of the evaluation to perform:
<dsettag> is the tag of a solution dataset. The default value is the current solution dataset of the model.
where <seltag> is the tag of a selection node to use for the data evaluation.
<seltag> can also be a positive integer array that corresponds to the domain index list. The default selection is all domains where the expression is defined. If the evaluation point does not belong to the specified domain selection the output value is NaN.
where <solnum> is an integer array corresponding to the inner solution index.
<solnum> can also be a string:
'end' or
'all' to evaluate the expression for the last inner solution or all inner solutions, respectively. By default the evaluation is performed on all inner solutions.
where <outersolnum> is a positive integer array corresponding to the outer solution index.
<outersolnum> can also be a string,
'all' or
'end', to evaluate the expression for all or the last outer solution, respectively. The default setting uses the first outer solution for the data evaluation.
where <time> is a double array. The default value corresponds to all the stored time steps.
where <dataoperation> can be one of the following value:
'none' (no operation performed),
'average' (to compute average of the selected series),
'integral' (to integrate over series),
'maximum' (to evaluate the maximum over series),
'minimum' (to evaluate the minimum),
'rms' (to compute the root mean square),
'stddev' (to compute the standard deviation), or
'variance' (to compute the variance).
The function mphmean also supports other output formats.
where unit is a 1xN cell array and N is the number of expressions to evaluate.
By default mphmean returns the results as a squeezed singleton. To get the full singleton set the
squeeze property to
off:
Set the property matrix to
off to return the data as a cell array instead of a double array:
where method can be
'integration' or
'summation'. The default uses the appropriate method for the given expression.
where <order> is a positive integer. The default value is 4.