Plot a triangulation with colored triangles

4 views (last 30 days)
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.

Accepted Answer

Michael
Michael on 19 Feb 2014
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.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!