How to read txt file and put the words on a vector and the numbers in a matrix?
2 次查看(过去 30 天)
显示 更早的评论
Hi
how do i extract the words and the numbers and put them in a vector(for words) and matrix(for numbers) with this txt file in this format:
Salmorrete, Vila Ló, Pião, Tortolindo, Chão de Frades
0 104 97 33 205
0 0 46 57 410
0 0 0 154 73
0 0 0 0 322
0 0 0 0 0
1 个评论
dpb
2023-10-10
See general use of the new(ish) string class example <word frequency example> for ideas on how to get started.
Post back when/if you get stuck somewhere...
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!