list2strs.m
来自「JLAB is a set of Matlab functions I have」· M 代码 · 共 36 行
M
36 行
function[y]=list2strs(x)%LIST2STRS Converts a comma-delimited list into a cell array of strings.% _________________________________________________________________% This is part of JLAB --- type 'help jlab' for more information% (C) 2002, 2004 J.M. Lilly --- type 'help jlab_license' for details y=[];index=find(real(x)==real(','));if ~isempty(index) a=[1 index+1]; b=[index-1 length(x)]; for i=1:length(a) y{i}=deblank(x(a(i):b(i))); endendy=packstrs(y);if 0 if ~isempty(index) if index(end)==length(x) index=index(1:end-1); x=x(1:end-1); end end if ~isempty(index) if index(1)==1 index=index(2:end); end endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?