mphmesh
Plot a mesh in a MATLAB® figure window.
Syntax
mphmesh(model)
mphmesh(model,meshtag,...)
pd=mphmesh(model,meshtag,...)
Description
mphmesh(model) plots the mesh case in a MATLAB figure.
mphmesh(model,meshtag,...) plots the mesh case meshtag in a MATLAB figure. If there is only one mesh in the model the meshtag can be left empty.
The function mphmesh accepts the following property/value pairs:
on | off
on | off
on | off
on | off
on | off
on | off
String | 'auto' | ''
Example
Plot the mesh case
model = mphopen('model_tutorial_llmatlab');
model.component('comp1').mesh.run;
mphmesh(model)
Create a second mesh case with an “extra fine” default mesh settings and plot it:
mesh = model.component('comp1').create('mesh2');
mesh.autoMeshSize(2);
mesh.run;
mphmesh(model,'mesh2','meshcolor','r');
The mesh can be plotted with view settings applied. This results in a mesh with grid, axes labels, lights, hiding etc. applied to the plot. Usually it is sufficient to use the auto setting, but any valid view can be applied:
mphmesh(model, 'mesh1', 'view', 'auto')
Plot data can be returned from mphmesh. This can be used to create the plot later or to extract information used to create the plot for further analysis
pd = mphmesh(model, 'mesh1');
mphplot(pd)
See also
mphgeom, mphmeshstats, mphplot