iskeep.m
来自「student teacher and proferssor llove thi」· M 代码 · 共 21 行
M
21 行
function out=iskeep(str)if ~isempty(str) logicalops={'.not.';'.and.';'.or.'}; out=((isletter(str))|(str=='_')|(str=='.')|((str>47)&(str<58))); temp1=findstr(str,'.'); if ~isempty(temp1) %Don't want to count periods which are part of logical words for j=1:length(logicalops) temp2=findstr(str,logicalops{j}); if ~isempty(temp2) for i=1:length(temp1) if any(temp1(i)==temp2+length(logicalops{j})-1) out(temp1(i))=logical(0); end end end end endelse out=[];end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?