How to load files in order

1 Ansicht (letzte 30 Tage)
minsick
minsick am 8 Apr. 2020
Bearbeitet: Stephen23 am 8 Apr. 2020
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

Akzeptierte Antwort

Stephen23
Stephen23 am 8 Apr. 2020
Bearbeitet: Stephen23 am 8 Apr. 2020
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

Weitere Antworten (0)

Kategorien

Mehr zu Biological and Health Sciences 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!

Translated by