How to load files in order

1 次查看(过去 30 天)
I am looking for How to load files in order
please find attached file
If i = 1:5
data = importdata('RR.data.(i)');
That has error

采纳的回答

Stephen23
Stephen23 2020-4-8
编辑:Stephen23 2020-4-8
Use either of the methods shown in the documentation:
For example:
N = 2; % number of files
C = cell(1,N);
for k = 1:N
F = sprintf('RR.data.%u',k);
C{k} = dlmread(F);
end
M = vertcat(C{:});
Giving:
>> M
M =
0 850 0
0 850 0

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Biological and Health Sciences 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by