read file txt with strings and numbers
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Khoder Makkawi
el 11 de Sept. de 2023
Comentada: Star Strider
el 11 de Sept. de 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 comentarios
Respuesta aceptada
Star Strider
el 11 de Sept. de 2023
2 comentarios
Star Strider
el 11 de Sept. de 2023
‘How I can skip it ?’
Consider using the 'HeaderLines' name-value pair with readtable.
.
Más respuestas (0)
Ver también
Categorías
Más información sobre String Parsing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!