How to read txt file and put the words on a vector and the numbers in a matrix?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Alexandre
am 10 Okt. 2023
Kommentiert: Star Strider
am 10 Okt. 2023
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 Kommentar
dpb
am 10 Okt. 2023
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...
Akzeptierte Antwort
Star Strider
am 10 Okt. 2023
2 Kommentare
Star Strider
am 10 Okt. 2023
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Data Preparation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!