필터 지우기
필터 지우기

Plot a triangulation with colored triangles

조회 수: 3 (최근 30일)
Michael
Michael 2014년 2월 19일
답변: Michael 2014년 2월 19일
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