Loading multiple .dat files

11 次查看(过去 30 天)
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

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2013-3-25
编辑:Azzi Abdelmalek 2013-3-25
data=[];
for k=1:N
data=[data dlmread(sprintf('filename_%d_fileend.dat',k))]
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Standard File Formats 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by