textscan 4th row into one string
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Terek Li
am 16 Feb. 2017
Bearbeitet: per isakson
am 11 Nov. 2017
Hi,
I have a huge file that I want to read only the 4th row with delimiter ';'. I want to read everything in this row into one single string so that I can count the number of ';' and determine how many columns there are. What is the code to do this?
I have tried
result = textread('U:\EMC\SMI8A_75_FA.csv', '%s', 1, 'headerlines', 3);
but the results are off.
Thanks!
0 Kommentare
Akzeptierte Antwort
per isakson
am 11 Nov. 2017
Bearbeitet: per isakson
am 11 Nov. 2017
One way using textscan
fid = fopen( 'U:\EMC\SMI8A_75_FA.csv', 'r' );
result = textscan( fid, '%s', 1, 'headerlines',3, 'Delimiter','\n');
fclose( fid );
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Files 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!