📄 hastag.m
字号:
%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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -