map first field to second field in txt file
古いコメントを表示
hi,
I have this txt file :
1::Toy Story (1995) ::Animation|Children's|Comedy
2::Jumanji (1995) ::Adventure|Children's|Fantasy
8::Tom and Huck (1995) ::Adventure|Children's
I want to map for example 1 into animation, and 2 into adventure 8 into adventure i.e ,i need creat txtfile has two columns , the first column contains 1,2,8 and second column contains animation,adventure,adventure
please, how do that thanks in advance
採用された回答
その他の回答 (1 件)
huda nawaf
2012 年 8 月 4 日
編集済み: Walter Roberson
2012 年 8 月 4 日
3 件のコメント
Walter Roberson
2012 年 8 月 4 日
textscan() will not work for this, at least not as-is. You can read the file (such as by using fileread() ) and then use regexp() to parse it.
per isakson
2012 年 8 月 4 日
編集済み: per isakson
2012 年 8 月 4 日
See my answer above. I hope the lines you don't show don't contain "¤".
huda nawaf
2012 年 8 月 5 日
カテゴリ
ヘルプ センター および File Exchange で Large Files and Big Data についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!