import multi type data in MATLAB
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
How I can import a text file in MATLAB including 256 columns: first column is string and other columns are numeric data.
0 Kommentare
Akzeptierte Antwort
Gerd
am 29 Jun. 2011
Hi Sarah,
depending on your specific file you can use
fid= fopen('File.txt');
textscan(fid,'%s%f.....');
fclose(fid);
Gerd
6 Kommentare
Jan
am 29 Jun. 2011
Data = textscan(fid,['%s' repmat('%f',1,255)]);
Then Data is a cell, which contains the different columns as elements. See "help textscan".
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Large Files and Big Data 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!