get_linestyle.m

来自「实现地震勘探中」· M 代码 · 共 30 行

M
30
字号
function style=get_linestyle(index,styles)% Get the line style associated with index "index"% Defaultline styles are {'-';'--';':';'-.'}% If index "index" is greater than the number of markers specified the markers are% repeated.% See also: get_marker, get_color%% Written by: E. R.: October 17, 2007% Last updated:%%          style=get_linestyle(index,styles)% INPUT% index    index for which a line style r is requested% markers  optional; one or more markers to replace the defaults% OUTPUT% mark     string with line style%% EXAMPLE%          style=get_linestyle(2,{'-',':','--'})if nargin == 1  || isempty(styles)   styles= {'-';'--';':';'-.'};elseif ischar(styles)    styles={styles};     endstyle=styles{mod(index-1,length(styles))+1};

⌨️ 快捷键说明

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