read file txt with strings and numbers
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Khoder Makkawi
le 11 Sep 2023
Commenté : Star Strider
le 11 Sep 2023
blablabla
aaa 10 test 20
bbb 11 test1 21
ccc 12 test2 22
I have this data in a file .txt and I want to read the file.
I tried the following code but it is not working as I want to:
fid = fopen('test','r');
testData = fscanf(fid, '%s %d %s %d',[2 inf]);
fclose(fid);
0 commentaires
Réponse acceptée
Star Strider
le 11 Sep 2023
2 commentaires
Star Strider
le 11 Sep 2023
‘How I can skip it ?’
Consider using the 'HeaderLines' name-value pair with readtable.
.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Text Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!