nextcolor.m

来自「matlabDigitalSigalProcess内有文件若干」· M 代码 · 共 23 行

M
23
字号
function [lineinfo,colorCount] = nextcolor(co,lso,colorCount)
%Returns next available color and linestyle and increments colorCount
% Inputs:
%      co - cell array of colors
%      lso - cell array of line styles
%      colorCount - number of colors allocated thus far
% Outputs:
%      lineinfo - structure with .color and .linestyle fields
%
% Used by sigbrowse, filtview and spectview

%       Copyright (c) 1988-98 by The MathWorks, Inc.
% $Revision: 1.3 $

lc = length(co);
ls = length(lso);
   
colorCount = colorCount + 1;

lineinfo.color = co{rem(colorCount-1,lc)+1};
lineinfo.linestyle = lso{rem(ceil(colorCount/lc)-1,ls)+1};
    

⌨️ 快捷键说明

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