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 件のコメント

Image Analyst
Image Analyst 2014 年 11 月 19 日
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 日

0 投票

v={'bug fixes'; 'stability improved'; 'new feature added'}
out=regexp(v,'\S+','match')
out= [out{:}]

1 件のコメント

chenyu
chenyu 2014 年 11 月 20 日
Thanks a lot! It works perfectly!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

質問済み:

2014 年 11 月 19 日

コメント済み:

2014 年 11 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by