The Numerical Node Syntax
Use the numerical node to perform numerical evaluation from within the COMSOL Multiphysics model. Numerical operations such as computing averages, integrations, maxima, or minima of a given expression are available. You can also perform point and global evaluations.
To create a numerical node, enter:
model.result.numerical.create(<numtag>, numtype)
where numtype is the type of operation to be performed by the node.
To store the data needed to create a table and associate the table to the numerical node:
model.result.table.create(<tabletag>,'Table')
model.result.numerical(<numtag>).set('table',<tabletag>)
where <tabletag> is the tag of the table where you want to store the data evaluated with the numerical operations defined with the tag <numtag>.
To extract the data stored in MATLAB into a table, use the methods getRealRow and getImagRow, such as:
realRow = model.result.table(<tabletag>).getRealRow(<idx>)
imagRow = model.result.table(<tabletag>).getImagRow(<idx>)
where <idx> is the column index of the table <tabletag>.
For data evaluation in MATLAB you can also use the functions mpheval, mphevalpoint, mphglobal, mphint2, mphinterp, mphmax, mphmean and mphmin.