Hello,
I'm trying to do text classification by using Matlab. While I got struck in the beginning. I have training data in csv file like {bug fixes; stability improved; new feature added} And how can I convert it into a cell array with a single word in each cell, like {bug;fixes;stability;improved;...}?
I am trying to use textscan but it seems not work.
Thanks a lot.

1 个评论

There's no comma in {bug fixes; stability improved; new feature added}. And you forgot to attach the csv file to make it easy for us to help you. Can you do that?

请先登录,再进行评论。

 采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2014-11-19
编辑:Azzi Abdelmalek 2014-11-19
v={'bug fixes'; 'stability improved'; 'new feature added'}
out=regexp(v,'\S+','match')
out= [out{:}]

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by