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 in a MATLAB figure.
mphmesh(model,meshtag,...)
plots the mesh
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:
Table 6-23:
property/value Pairs for the mphmesh Command
property
Value
default
description
Parent
Double
Parent axis
Edgecolor
Char
k
Edge color
Edgelabels
on
|
off
off
Show edge labels
Edgelabelscolor
Char
k
Color for edge labels
Edgemode
on
|
off
on
Show edges
Facealpha
Double
1
Set transparency value
Facelabels
on
|
off
off
Show face labels
Facelabelscolor
Char
k
Color for face labels
Facemode
on
|
off
on
Show faces
Meshcolor
Char | vector
gray
Color for face element
Vertexcolor
Char | vector
k
Color for vertices
Vertexlabels
on
|
off
off
Show vertex labels
Vertexlabelscolor
Char | vector
k
Color for vertex labels
Vertexmode
on
|
off
off
Show vertices
View
String |
'auto'
|
''
View settings
Example
Plot the mesh
model = mphopen('model_tutorial_llmatlab');
model.component('comp1').mesh.run;
mphmesh(model)
Create a second mesh 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