Feb 3, 2012

Matlab parsing a string by a delimiter

Reference: regexp
inputTxt=textscan(fid,'%s',1,'delimiter','\n');
input=inputTxt{1};
str = cellstr(input)
disp(input);
sElem = regexp(str, ' ', 'split');
splitedElem = sElem{1};

No comments:

Cat

Ragdoll Cat         Persian Cat     Finish Cat