MATLAB里等高线返回矩阵C是什么东西

来源:百度知道 编辑:UC知道 时间:2024/04/29 08:25:34
[x,y]=meshgrid(-2:1:2,-2:1:3)
z=x+y
[C,h]=contour(x,y,z)
这里出来的矩阵C是什么

嗯,这个解释在contourc命令里面有,你可以看看. C一个两行的矩阵,描述了画线时候的x, y坐标配对情况,对应着哪一层"等高线".

The contour matrix C is a two row matrix of contour lines. Each
contiguous drawing segment contains the value of the contour,
the number of (x,y) drawing pairs, and the pairs themselves.
The segments are appended end-to-end as

C = [level1 x1 x2 x3 ... level2 x2 x2 x3 ...;
pairs1 y1 y2 y3 ... pairs2 y2 y2 y3 ...]