Could we add variable in folder directory ??
25 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to access several sequenced folders
Example :
[ndata, text, alldata] = xlsread('D:\folder\1\file');
[ndata, text, alldata] = xlsread('D:\folder\2\file');
[ndata, text, alldata] = xlsread('D:\folder\3\file');
[ndata, text, alldata] = xlsread('D:\folder\4\file');
Could I replace 1,2,3and 4 by variable i .. How could the directory be written here ?!!
0 Commenti
Risposta accettata
Jason Ross
il 13 Mar 2012
Use something like this:
1 Commento
Jan
il 13 Mar 2012
Or explicitely:
for k = 1:4; xlsread(['D:\folder\', sprintf('%d', k). '\file']); end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su File Operations 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!