Textscan cannot return anything in Matlab 2013a
1 view (last 30 days)
Show older comments
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?
3 Comments
Answers (0)
See Also
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!