translate.m
来自「一些制作正交曲线网格的matlab源程序」· M 代码 · 共 36 行
M
36 行
function theResult = translate(self, theEvent)% ps/translate -- Translate a "ps" event.% translate(self, 'theEvent') converts 'theEvent'% to canonical form for use by "ps" event% handlers. The result is lowercase, free of% blanks, and consists entirely of alphanumeric% characters and '_'. % Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO.% All Rights Reserved.% Disclosure without explicit written consent from the% copyright owner does not constitute publication. % Version of 09-Dec-1999 02:45:49.% Updated 09-Dec-1999 02:45:49.if nargout > 0, theResult = []; endif nargin < 2, help(mfilename), return, endresult = lower(theEvent);theLetters = char([abs('a'):abs('z') abs('0'):abs('9') '_']);for i = length(result):-1:1 if ~any(result(i) == theLetters) result(i) = ''; endendif nargout > 0 theResult = result;else assignin('caller', 'ans', result) disp(result)end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?