assignline.m
来自「有关matlab的电子书籍有一定的帮助希望有用」· M 代码 · 共 32 行
M
32 行
function [oh,lc] = assignline(lc,M,parent_ax,varargin)
%ASSIGNLINE Assign lines from cache, or create new lines.
% [oh,lc] = assignline(lc,data,parent_ax)
% Inputs:
% lc - line cache - vector of handles to line objects
% M - number of lines to create / assign.
% parent_ax - axes object handle which is the parent of lines
% param/value pairs - for setting properties of any lines in oh
% Outputs:
% oh - vector of output handles
% lc - line cache, updated
%
% Used by sigbrowse and spectview
% Copyright (c) 1988-98 by The MathWorks, Inc.
% $Revision: 1.3 $
if length(lc)>=M
oh = lc(1:M);
lc = lc(M+1:end);
else
M=M-length(lc);
oh = lc;
lc = zeros(0,1);
oh = [oh; line(zeros(2,M),zeros(2,M),'parent',parent_ax) ];
end
oh = oh(:);
if nargin>3
set(oh,varargin{:})
end
lc = lc(:);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?