Plot a triangulation with colored triangles

3 次查看(过去 30 天)
I'm developing a toolbox for PDEs. Now I'd like to plot my results. I have a triangulation which consists of a matrix with all points of size = [2, number of points], and a matrix which contains the indices of the three points defining each triangle, size = [3, number of triangles]. Basically the same format as in the Matlab PDE toolbox. Furthermore, each of the points has assigned a corresponding z value - the solution of the PDE in this point.
What I'd like to do is to plot this triangulation in 2D with a coloring corresponding to the z value at each point. More or less the same as in the PDE tool.
BUT - whatever functions I looked at, I always end up with a 3D plot.

采纳的回答

Michael
Michael 2014-2-19
When closing the browser windows from my research and waiting for an answer, I discovered this:
pdeplot(points, [], triangles, 'xydata', ce_p)
This is exactly what I need.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geometry and Mesh 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by