Use the function mphmax to evaluate the maximum of a given expression over an inner solution list.
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 mphmax 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).
where data(:,1) contains the maximum value of the expression for each solution step, and
data(:,2:Sdim+1) returns the position of the maximum, with
Sdim the space dimension number.
The function mphmax also supports other output formats.
where unit is a 1xN cell array and N is the number of expressions to evaluate.
By default mphmax 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: