matlab中colormap(map) map为什么没被定义

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 16:49:04
matlab中colormap(map) map为什么没被定义

matlab中colormap(map) map为什么没被定义
matlab中colormap(map) map为什么没被定义

matlab中colormap(map) map为什么没被定义
已定义的一些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色的灰度色.