1
MATLAB中的正则表达式是否使用负整数,例如“-1”。我的代码似乎没有运行良好,因为这个错误"Index exceeds matrix dimensions."
,我知道它与我的数据文件中的负值有关。它在工作区窗口中显示负整数。允许MATLAB中的正则表达式使用负整数
任何想法,我可以怎样让我的正则表达式
这里负整数的代码:
m = regexp(value, 'START=(\d+)', 'tokens');
m2 = regexp(value, 'STOP=(\d+)', 'tokens');
start = cell2mat(m{1});
stop = cell2mat(m2{1});
% Print result
fprintf(fout, 'INSERT INTO cath_domains (pdbcode, cathbegin, cathend) VALUES("%s", %s, %s)\n', domain, start, stop);
我完全忘了回合'?'您可以在其中放置任何符号以被接受。谢谢你的提醒。 – Jeiman 2012-01-04 14:33:23