setmap.m

来自「matlab处理图像的一些基本方法。其中有一部分mex程序需要安装编译」· M 代码 · 共 42 行

M
42 行
字号
function setmap(n)%SETMAP  Set the image colormap.%%        SETMAP(COLORMAP)%%        COLORMAP is a number between 1 and 20 as on the Nanoscope%            or a new colormap.%%        Claudio  25 Jan, 1995.%%% Copyright (c) 1995 by Claudio Rivetti and Mark Young% claudio@alice.uoregon.edu,    mark@alice.uoregon.edu%global map Extramap Undofun ed_colormapglobal cmapif prod(size(n)) == 1  map=cmap{n};  setclipboard(getmap);  Undofun='setmap(getclipboard);';  set(ed_colormap, 'value', n, 'string', num2str(n));else  premap=map;  map=n;  cmap{getmap}=map;  Undofun='setmap(getclipboard);';  setclipboard(premap);endap=mapcontrast(map, getcontrast);ap=mapoffset(ap, getoffset);colormap(ap);return

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?