matlab中colormap map为什么没被定义

matlab中colormap map为什么没被定义,第1张

定义的一些map的值有'jet'(默认),'hsv','hot','cool','spring','gray'等,具体可以看colormap的帮助,如colormap(gray)

也可以自定义颜色映射矩阵

map=[1 0 0;0 1 0;0 0 1];%这个色表中只有三原色

colormap(map)

另外说一下,上述定义过的函数可以指定颜色数量。比如gray(100)就生成了100种从黑到白的渐变色,gray(128)就生成了128色,默认值是256色。如colormap(gray(32))就是32色的灰度色。

help colormap

 colormap Color look-up table

    colormap(MAP) sets the current figure's colormap to MAP

    colormap('default') sets the current figure's colormap to

    the root's default, whose setting is PARULA

    MAP = colormap returns the three-column matrix of RGB triplets defining 

    the colormap for the current figure

    colormap(FIG,) sets the colormap for the figure specified by FIG

    colormap(AX,) sets the colormap for the axes specified by AX 

    Each axes within a figure can have a unique colormap After you set

    an axes colormap, changing the figure colormap does not affect the axes

    MAP = colormap(FIG) returns the colormap for the figure specified by FIG

    MAP = colormap(AX) returns the colormap for the axes specified by AX

>> help intersect

INTERSECT Set intersection

INTERSECT(A,B) for vectors A and B, returns the values common to the

two vectors MATLAB sorts the results A and B can be cell arrays of

strings

INTERSECT(A,B,'rows') for matrices A and B that have the same number of

columns, returns the rows common to the two matrices MATLAB ignores

the 'rows' flag for all cell arrays

[C,IA,IB] = INTERSECT(A,B) also returns index vectors IA and IB

such that C = A(IA) and C = B(IB)

[C,IA,IB] = INTERSECT(A,B,'rows') also returns index vectors IA and IB

such that C = A(IA,:) and C = B(IB,:)

Class support for inputs A,B:

float: double, single

See also unique, union, setdiff, setxor, ismember

Overloaded methods:

cell/intersect

ordinal/intersect

nominal/intersect

categorical/intersect

xregpointer/intersect

Reference page in Help browser

doc intersect

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/12176246.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存