⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rainbow_colors.m

📁 MATLAB应用工具箱, MATLAB应用工具箱,
💻 M
字号:
%rainbow_colors    [C] = rainbow_colors(n)%% returns a set of n colors following a% stretch of the rainbow.% (c) 2004 CK Machens & CD Brodyfunction [C] = rainbow_colors(nclasses)      rainbowcolormap = hsv(256);    rainbowcolormap = ...       rainbowcolormap([250:256 1:40 50:110 135:155],:);    rainbowcolormap = rainbowcolormap(end:-1:1,:);   cmap = rainbowcolormap;   C = zeros(nclasses, 3);      for i=1:nclasses,      g = ((i-1)/(nclasses-1))*(size(cmap,1)-1) + 1;      g = round(g);      C(i,:) = cmap(g,:);   end;

⌨️ 快捷键说明

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