📄 ismname.m
字号:
function[b]=ismname(x)%ISMNAME Tests whether a string is an m-file name; cells OK %% ISMNAME STR tests whether a string STR has the ending ".m".%% ISMNAME(X) where X is a cell array of strings returns a boolean% array testing whether each string has the ending ".m".% _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information % (C) 2002, 2004 J.M. Lilly --- type 'help jlab_license' for details if iscell(x) for i=1:length(x) b(i)=ismname1(x{i}); endelse b=ismname1(x);endfunction[b]=ismname1(x) x=deblank(x);if length(x)>=2 b=strcmp(x(end-1:end),'.m');else b=0;endif strcmp(x(1),'#') || strcmp(x(1),'.') %Exclude funny names b=0;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -