?? rmtag.m
字號:
%RMTAG removes tag from object%% RMTAG(OBJ_HANDLE,STR)% % Removes the tag STR from the object referrenced by OBJ_HANDLE% When OBJ_HANDLE is an array of handles, the tag is removed from all% corresponding objects.% % 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, hastag, findtag%% G.Rilling 12/2006% gabriel.rilling@ens-lyon.frfunction rmtag(obj,str)if any(~hastag(obj,str)) warning('rmtag:warning','no such tag in object')endarrayfun(@rmtag1,1:length(obj)); function rmtag1(ind) tag = get(obj(ind),'Tag'); tag = regexprep(tag,['(\W|^)',str,'(\W|$)'],'$1$2'); tag = regexprep(tag,',,',','); tag = regexprep(tag,'^,|,$',''); set(obj(ind),'Tag',tag); endend
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -