Evaluating a Matrix Expression at Points
The function mphevalpointmatrix returns the result of a given matrix expression evaluated at the points:
M = mphevalpointmatrix(model,<expr>,...)
where <expr> is the COMSOL expressions to evaluate. The output M is a matrix.
The rest of this section has additional information for the function mphevalpointmatrix:
Specify the Evaluation Data
The function mphevalpoint supports the following properties to set the data of the evaluation to perform:
dataset, specify the solution dataset to use in the evaluation:
M = mphevalpointmatrix(model,<expr>,'dataset',<dsettag>)
<dsettag> is the tag of a solution dataset. The default value is the current solution dataset of the model.
selection, specify the domain selection for evaluation:
M = mphevalpointmatrix(model,<expr>,'selection',<seltag>)
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.
solnum, specify the inner solution number for data evaluation. Inner solutions are generated for the following analysis types: time domain, frequency domain, eigenvalue, or stationary with continuation parameters:
M = mphevalpointmatrix(model,<expr>,'solnum',<solnum>)
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 solution respectively. By default the evaluation is performed on all inner solution.
outersolnum, specify the outer solution number for data evaluation. Outer solutions are generated with parametric sweeps:
M = mphevalpoint(model,<expr>,'outersolnum',<outersolnum>)
where <outersolnum> is a positive integer 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 settings use the first outer solution for the data evaluation.
M = mphevalpointmatrix(model,<expr>,'t', <time>)
where <time> is a double array. The default value corresponds to all the stored time steps.
M = mphevalpointmatrix(model,<expr>,'dataseries', dataseries)
where dataseries is either 'none', 'average' or 'sum'.