MATLAB Answers

mesh display with element values

5 views (last 30 days)
Pinpress
Pinpress on 8 Apr 2013
Hi,
If I use patch to display a mesh, I can color code the mesh surface by specifying the nodal values. However, from finite element methods, frequently I only have element values (i.e., scalar values for each element, but not for each node). In this case, how can I efficiently display the mesh in Matlab and color code the surface then? Can I color code directly each patch instead of the node?
If not, then I could interpolate values on the nodes, and then do display using patch. Then my other question is, when I open the graphics handle, which field corresponds to the scalar values I used for the node then?
thanks.

  0 Comments

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 8 Apr 2013
surf() might do the interpolation in a way that suits you. The values you provide would become the CData property of the surface.
If you use patch() then you can specify VertexCData or FaceCData properties.

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!