【发布时间】:2013-06-17 22:34:12
【问题描述】:
我有一个代码,我试图在 matlab 中运行,它在 textscan 函数中给出错误
因为它不能在分隔符上拆分字符串,尽管我确信代码适用于其他版本的 matlab(在其他计算机上)
>> a='ahmed;mohamed'
a =
ahmed;mohamed
>> b = textscan(a, '%s;%s', 'Delimiter', ';')
b =
{1x1 cell} {0x1 cell}
>> b{1}
ans =
'ahmed'
>> b{2}
ans =
Empty cell array: 0-by-1
有人可以解释为什么会这样吗? textscan 功能最近有变化吗? 我正在使用 matlab 2013
【问题讨论】: