Matlab的Mathematica的ListDensityPlot []函数的等价物

时间:2016-07-06 17:33:27

标签: matlab density-plot

Mathematica的ListDensityPlot []可以获取3D坐标列表,其中第三个坐标是标量,称其为温度或浓度等,并返回密度图。该列表看起来像

 temperature={{0,0,20},{0,1,25},...,{9,9,35}}

在Mathematica表示法中。

Mathematica自动对值进行插值(我猜),因此它返回一个连续,平滑的图像,并带有色标来描述2D平面上的标量值。

Matlab中有什么相同的东西吗?

由于

1 个答案:

答案 0 :(得分:0)

您可以使用平面点的Delaunay三角剖分函数,然后在三角剖分上生成曲面。

它看起来像这样:

Points=[xpoints, ypoints, zpoints];
tri=delaunay(Points(:,1), Points(:,2));
figure
trisurf(tri, Points(:,1), Points(:,2), Points(:,3))
shading interp
colormap jet
colorbar EastOutside