import multiple files with for loop
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Thodoris Ptrks
am 18 Dez. 2019
Kommentiert: Thodoris Ptrks
am 18 Dez. 2019
Hello, i need to know how can i do this with a double for loop,
sza10str2 = importdata("10.0_02_streams.out");
sza10str4 = importdata("10.0_04_streams.out");
sza10str8 = importdata("10.0_08_streams.out");
sza10str16 = importdata("10.0_16_streams.out");
sza30str2 = importdata("30.0_02_streams.out");
sza30str4 = importdata("30.0_04_streams.out");
sza30str8 = importdata("30.0_08_streams.out");
sza30str16 = importdata("30.0_16_streams.out");
i tried something like this but it doesn't woks.
Any suggestions?
Thank you..
x = [10.0 30.0];
y = [02 04 08 16];
for i = 1:2
for j=1:4
sza{i}streams{j} = importdata(sprintf('%d_%d_streams.out', x(i),y(j)));
end
end
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!