Loading multiple .dat files
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a set of data consisting N no of files where each file is a column of N no of rows; all I need is to load the entire data column by column and construct a NxN square matrix. Each data file is saved as a .dat file and the Nth file has a name: filename_M_fileend.dat where M has N different values.
How I can construct the data matrix?
Thanks. Arijit
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 25 Mär. 2013
Bearbeitet: Azzi Abdelmalek
am 25 Mär. 2013
data=[];
for k=1:N
data=[data dlmread(sprintf('filename_%d_fileend.dat',k))]
end
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets 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!