个性化阅读
专注于IT技术分析

MATLAB函数pcolor()

伪彩色图是单元格的矩形阵列, 其颜色由C保留。

句法

pcolor(C) // It draw a pseudocolor plot. The items of C are linearly mapped to an index into the current colormap.
pcolor(X, Y, C) // It draw a pseudocolor plot of the items of C at the locations stated by X and Y. The plot is the logically rectangular, two-dimensional grid with vertices at the points [X(i, j), Y(i, j)]. 
h = pcolor(...) // It returns a handle to a surface graphic object.

例子

z^2=x^2+y^2-5 sin?(xy)
|x|≤2, |y|≤2.
r=-2: .2:2;
[X, Y]= meshgrid (r, r);
Z=X.^2- 5*sin(X.*Y)+Y.^2;
pcolor(Z), axis('off')
shading interp

输出

MATLAB pcolor()

赞(0)
未经允许不得转载:srcmini » MATLAB函数pcolor()

评论 抢沙发

评论前必须登录!