Textscan cannot return anything in Matlab 2013a
1 次查看(过去 30 天)
显示 更早的评论
Dear users
I am using Matlab 2013a on my MAC. I am working on other people's code now to extract string from txt file. These codes work well on Matlab-Windows version but they can not work under my Matlab-MAC version and also my college's Matlab-MAC version:
K>> fnames
fnames =
Index,Initials,Name,MiddleName,LastName,Date
K>> res=textscan(fnames,'%s','delimiter',',')
K>> res
Undefined function or variable 'res'.
fnames is a header string extracted from a txt file using strtok() function
I tried to manually replace fnames with a written string, it works:
K>> fnames='Index,Initials,Name,MiddleName,LastName,Date';
K>> res=textscan(fnames,'%s','delimiter',',')
res =
{6x1 cell}_ _
I am very confused about this, anybody came up with the same problem?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!