hastag.m

来自「经验模态分解(EMD)的Matlab程序包」· M 代码 · 共 26 行

M
26
字号
%HASTAG  tests if an object has a specific tag%% BOOL = HASTAG(OBJ_HANDLE,STR)% % Tests if the object corresponding to OBJ_HANDLE has the tag STR.% When OBJ_HANDLE is an array of handles HASTAG returns a logical array of% the same size.% % Rem: In order for this to work properly, the object's tag field must be a string % containing keywords (or tags) separated by commas.%%% See also%  addtag, findtag, rmtag%% G.Rilling 12/2006% gabriel.rilling@ens-lyon.frfunction bool=hastag(obj,str)tag = get(obj,'Tag');tmp = regexp(tag,['(\W|^)',str,'(\W|$)'],'once');if iscell(tmp)  bool = ~cellfun(@isempty,tmp);else  bool = ~isempty(tmp);end

⌨️ 快捷键说明

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