import multiple files with for loop
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Thodoris Ptrks
il 18 Dic 2019
Commentato: Thodoris Ptrks
il 18 Dic 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 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!