📄 p_manglename.m
字号:
function mname = p_manglename(st,iname,warnstat)
% Copyright 2002 The MathWorks, Inc.
% $Revision: 1.1 $ $Date: 2002/05/01 21:12:49 $
error(nargchk(2,3,nargin));
if ~ishandle(st),
error('First Parameter must be a valid STRUCTURE handle ');
end
if ~ischar(iname)
error('Second Parameter must be a string ');
end
if nargin==3
if ~ischar(warnstat)
error('Third Parameter must be a string ');
elseif isempty(strmatch(lower(warnstat),{'on','off'},'exact'))
error('Third Parameter must be [on] or [off] only ');
end
warning(warnstat);
else
warning('on');
end
origname = iname;
if strcmp(iname(1),'_')
warning(['''' origname ''' starts with an invalid character ''_'', ''Q'' is attached (Q' iname ') ']);
iname = ['Q' iname];
end
if strfind(iname,'$')
warning(['''' origname ''' contains the invalid character ''$'', it is replaced with ''DOLLAR''']);
iname = strrep(iname,'$','DOLLAR');
end
if strfind(iname,'.')
warning(['''' origname ''' contains the invalid character ''.'', it is replaced with ''PERIOD''']);
iname = strrep(iname,'.','PERIOD');
end
mname = iname;
% [EOF] p_manglename.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -